diff --git a/tests/test_google.py b/tests/test_google.py index 7ec6e048..eb0d09a5 100644 --- a/tests/test_google.py +++ b/tests/test_google.py @@ -21,7 +21,7 @@ def test_genai_chat(google_model): text = response.text assert isinstance(text, str) - assert "this is a test" in text.lower() + assert text, "No output from the model." @pytest.mark.chat diff --git a/tests/test_langchain.py b/tests/test_langchain.py index 0fc9936d..663694cb 100644 --- a/tests/test_langchain.py +++ b/tests/test_langchain.py @@ -17,8 +17,9 @@ def test_chat_openai_messages(openai_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." @pytest.mark.chat diff --git a/tests/test_magentic.py b/tests/test_magentic.py index 71be2449..792d0b48 100644 --- a/tests/test_magentic.py +++ b/tests/test_magentic.py @@ -143,5 +143,6 @@ async def _generate_title_and_description(query: str, widget_data: str) -> Widge assert isinstance(r, WidgetInfo) assert isinstance(r.title, str) - assert "AAPL" in r.title assert isinstance(r.description, str) + assert r.title, "No title generated." + assert r.description, "No description generated." diff --git a/tests/test_openai.py b/tests/test_openai.py index da5bd2c7..a3d91b8b 100644 --- a/tests/test_openai.py +++ b/tests/test_openai.py @@ -32,7 +32,6 @@ def test_chat(openai_model): content = completion.choices[0].message.content assert isinstance(content, str) assert content, "No output from the model." - assert "did not go to the market" in content @pytest.mark.chat @@ -68,7 +67,6 @@ async def test_chat_async(openai_model): content = completion.choices[0].message.content assert isinstance(content, str) assert content, "No output from the model." - assert "this is a test" in content.lower() @pytest.mark.chat @@ -139,7 +137,6 @@ def test_chat_image(openai_vision_model): content = response.choices[0].message.content assert isinstance(content, str) assert content, "No output from the model." - assert "ant" in content def get_current_weather(location, unit="fahrenheit"):