diff --git a/libs/community/langchain_community/chat_models/bedrock.py b/libs/community/langchain_community/chat_models/bedrock.py index 74eb1af216e85..852eb0091f677 100644 --- a/libs/community/langchain_community/chat_models/bedrock.py +++ b/libs/community/langchain_community/chat_models/bedrock.py @@ -193,7 +193,13 @@ def format_messages( ) -_message_type_lookups = {"human": "user", "ai": "assistant"} +_message_type_lookups = { + "human": "user", + "ai": "assistant", + "AIMessageChunk": "assistant", + "HumanMessageChunk": "user", + "function": "user", +} @deprecated(