Skip to content

Commit

Permalink
Merge pull request #160 from log10-io/kt/fix-langchain-test
Browse files Browse the repository at this point in the history
Update langchain test assertion
  • Loading branch information
nqn authored May 23, 2024
2 parents db36cbe + d2c5ffa commit ebf8334
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_langchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@ def test_chat_anthropic_messages(anthropic_legacy_model):
messages = [SystemMessage(content="You are a ping pong machine"), HumanMessage(content="Ping?")]
completion = llm.predict_messages(messages)

assert isinstance(completion.content, str)
assert "pong" in completion.content.lower()
content = completion.content
assert isinstance(content, str)
assert content, "No output from the model."

0 comments on commit ebf8334

Please sign in to comment.