Skip to content

Commit

Permalink
standard-tests[patch]: test Message.name (#25677)
Browse files Browse the repository at this point in the history
  • Loading branch information
baskaryan authored Aug 22, 2024
1 parent ac7b71e commit cf9c484
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -523,3 +523,10 @@ def test_tool_message_error_status(self, model: BaseChatModel) -> None:
]
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

0 comments on commit cf9c484

Please sign in to comment.