The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
anthropic[patch]: Fix message type lookup in Anthropic Partners (#16563)
JongRok BAEK3b8eba32f93c
diff --git a/libs/partners/anthropic/langchain_anthropic/chat_models.py b/libs/partners/anthropic/langchain_anthropic/chat_models.pyindex 91cc511248..812b829589 100644--- a/libs/partners/anthropic/langchain_anthropic/chat_models.py+++ b/libs/partners/anthropic/langchain_anthropic/chat_models.py@@ -16,7 +16,7 @@ from langchain_core.outputs import ChatGeneration, ChatGenerationChunk, ChatResufrom langchain_core.pydantic_v1 import Field, SecretStr, root_validatorfrom langchain_core.utils import convert_to_secret_str-_message_type_lookups = {"human": "user", "assistant": "ai"}+_message_type_lookups = {"human": "user", "ai": "assistant"}def _format_messages(messages: List[BaseMessage]) -> Tuple[Optional[str], List[Dict]]: