mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-21 08:20:44 +00:00
fix: litellm_core_utils/prompt_templates/factory.py:3431
This commit is contained in:
@@ -3427,7 +3427,7 @@ def _deduplicate_bedrock_content_blocks(
|
||||
deduplicated: List[BedrockContentBlock] = []
|
||||
for block in blocks:
|
||||
keyed = block.get(block_key)
|
||||
if keyed is not None:
|
||||
if keyed is not None and isinstance(keyed, dict):
|
||||
block_id = keyed.get(id_key)
|
||||
if block_id:
|
||||
if block_id in seen_ids:
|
||||
|
||||
@@ -74,7 +74,7 @@ class AnthropicMessagesHandler(BaseTranslation):
|
||||
if messages is None:
|
||||
return data
|
||||
|
||||
chat_completion_compatible_request = (
|
||||
chat_completion_compatible_request, tool_name_mapping = (
|
||||
LiteLLMAnthropicMessagesAdapter().translate_anthropic_to_openai(
|
||||
anthropic_message_request=cast(AnthropicMessagesRequest, data)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user