mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
fix(factory.py): fix anthropic check
This commit is contained in:
parent
23e287bb58
commit
44c0a7f63e
1 changed files with 0 additions and 7 deletions
|
@ -700,13 +700,6 @@ def anthropic_messages_pt(messages: list):
|
|||
if assistant_content:
|
||||
new_messages.append({"role": "assistant", "content": assistant_content})
|
||||
|
||||
if (
|
||||
msg_i < len(messages)
|
||||
and messages[msg_i]["role"] != user_message_types
|
||||
and messages[msg_i]["role"] != "assistant"
|
||||
):
|
||||
raise Exception(f"Invalid role passed in - {messages[msg_i]}")
|
||||
|
||||
if new_messages[0]["role"] != "user":
|
||||
if litellm.modify_params:
|
||||
new_messages.insert(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue