diff --git a/libs/standard-tests/langchain_standard_tests/integration_tests/chat_models.py b/libs/standard-tests/langchain_standard_tests/integration_tests/chat_models.py index 15a92d7133f1e..f3496e4fb018f 100644 --- a/libs/standard-tests/langchain_standard_tests/integration_tests/chat_models.py +++ b/libs/standard-tests/langchain_standard_tests/integration_tests/chat_models.py @@ -117,6 +117,21 @@ async def test_abatch( assert isinstance(result.content, str) assert len(result.content) > 0 + def test_conversation( + self, chat_model_class: Type[BaseChatModel], chat_model_params: dict + ) -> None: + model = chat_model_class(**chat_model_params) + messages = [ + HumanMessage(content="hello"), + AIMessage(content="hello"), + HumanMessage(content="how are you"), + ] + result = model.invoke(messages) + assert result is not None + assert isinstance(result, AIMessage) + assert isinstance(result.content, str) + assert len(result.content) > 0 + def test_tool_message_histories_string_content( self, chat_model_class: Type[BaseChatModel],