From 416bdbdd992ad03ed56c72ac70d62cf4389b82f0 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Wed, 5 Feb 2025 17:25:56 -0800 Subject: [PATCH] test: update test --- .../test_convert_dict_to_chat_completion.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/llm_translation/test_llm_response_utils/test_convert_dict_to_chat_completion.py b/tests/llm_translation/test_llm_response_utils/test_convert_dict_to_chat_completion.py index f1b6250bb5b..3b0bd6ca821 100644 --- a/tests/llm_translation/test_llm_response_utils/test_convert_dict_to_chat_completion.py +++ b/tests/llm_translation/test_llm_response_utils/test_convert_dict_to_chat_completion.py @@ -327,12 +327,21 @@ def test_convert_to_model_response_object_json_mode(): This test is verifying that when convert_tool_call_to_json_mode is True, a single tool call's arguments are correctly converted into the message content of the response. """ model_response_object = ModelResponse(model="gpt-3.5-turbo") + from litellm.constants import RESPONSE_FORMAT_TOOL_NAME + response_object = { "choices": [ { "message": { "role": "assistant", - "tool_calls": [{"function": {"arguments": '{"key": "value"}'}}], + "tool_calls": [ + { + "function": { + "arguments": '{"key": "value"}', + "name": RESPONSE_FORMAT_TOOL_NAME, + } + } + ], }, "finish_reason": None, }