From d2c5ffa23cde7493fd4de82907ba041b01bad11e Mon Sep 17 00:00:00 2001 From: Kim Tran Date: Mon, 20 May 2024 12:28:16 -0400 Subject: [PATCH] Update langchain test assertion --- tests/test_langchain.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_langchain.py b/tests/test_langchain.py index 189012a5..0fc9936d 100644 --- a/tests/test_langchain.py +++ b/tests/test_langchain.py @@ -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."