Skip to content

Commit

Permalink
(standard tests): add test for basic conversation sequence (#21213)
Browse files Browse the repository at this point in the history
  • Loading branch information
ccurme authored May 2, 2024
1 parent 1ebb5a7 commit 2d77e5e
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down

0 comments on commit 2d77e5e

Please sign in to comment.