Skip to content

The agent engineering platform.

BUGFIX: Update bedrock.py to fix provider bug (#13646)

David Ruan04bddbaba4b6
diff --git a/libs/langchain/langchain/chat_models/bedrock.py b/libs/langchain/langchain/chat_models/bedrock.py
index 011a7d372d..546562fa26 100644
--- a/libs/langchain/langchain/chat_models/bedrock.py
+++ b/libs/langchain/langchain/chat_models/bedrock.py
@@ -28,7 +28,7 @@ class ChatPromptAdapter:
) -> str:
if provider == "anthropic":
prompt = convert_messages_to_prompt_anthropic(messages=messages)
- if provider == "meta":
+ elif provider == "meta":
prompt = convert_messages_to_prompt_llama(messages=messages)
else:
raise NotImplementedError(