diff --git a/libs/partners/anthropic/langchain_anthropic/chat_models.py b/libs/partners/anthropic/langchain_anthropic/chat_models.py index 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, ChatResu from langchain_core.pydantic_v1 import Field, SecretStr, root_validator from 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]]: