From eaf5723b94f5f39840357955931fbc469238999d Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Thu, 14 Nov 2024 10:58:00 -0800 Subject: [PATCH] fix test_json_response_format --- tests/llm_translation/base_llm_unit_tests.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/llm_translation/base_llm_unit_tests.py b/tests/llm_translation/base_llm_unit_tests.py index bcdbe9e95..7e5113dfe 100644 --- a/tests/llm_translation/base_llm_unit_tests.py +++ b/tests/llm_translation/base_llm_unit_tests.py @@ -82,6 +82,10 @@ class BaseLLMChatTest(ABC): print(response) + # OpenAI guarantees that the JSON schema is returned in the content + # relevant issue: https://github.com/BerriAI/litellm/issues/6741 + assert response.choices[0].message.content is not None + @pytest.fixture def pdf_messages(self): import base64