standard-tests[patch]: test Message.name (#25677)

Tests:
https://github.com/langchain-ai/langchain/actions/runs/10516092584
This commit is contained in:
Bagatur 2024-08-22 14:47:31 -07:00 committed by GitHub
parent ac7b71e0d7
commit cf9c484715
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -523,3 +523,10 @@ class ChatModelIntegrationTests(ChatModelTests):
]
result = model_with_tools.invoke(messages)
assert isinstance(result, AIMessage)
def test_message_with_name(self, model: BaseChatModel) -> None:
result = model.invoke([HumanMessage("hello", name="example_user")])
assert result is not None
assert isinstance(result, AIMessage)
assert isinstance(result.content, str)
assert len(result.content) > 0