You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When one message with role system is passed, LiteLLM correctly extracts out system message to be sent as system parameter for Anthropic. However, it leaves with no messages left to LLM. The code throws exception which can be hard to decipher. litellm/llms/prompt_templates/factory.py\", line 2401, in _bedrock_converse_messages_pt\n if messages[0].get(\"role\") is not None and messages[0][\"role\"] == \"assistant\":\nIndexError: list index out of range\n"
Motivation, pitch
LiteLLM's abstraction of message type passing for different LLMs is amazing. However, when there are issues like above, a more clear message would really help users to understand what has gone wrong and how to fix it.
Twitter / LinkedIn details
No response
The text was updated successfully, but these errors were encountered:
The Feature
When one message with role system is passed, LiteLLM correctly extracts out system message to be sent as system parameter for Anthropic. However, it leaves with no messages left to LLM. The code throws exception which can be hard to decipher.
litellm/llms/prompt_templates/factory.py\", line 2401, in _bedrock_converse_messages_pt\n if messages[0].get(\"role\") is not None and messages[0][\"role\"] == \"assistant\":\nIndexError: list index out of range\n"
Motivation, pitch
LiteLLM's abstraction of message type passing for different LLMs is amazing. However, when there are issues like above, a more clear message would really help users to understand what has gone wrong and how to fix it.
Twitter / LinkedIn details
No response
The text was updated successfully, but these errors were encountered: