From 2023ca01c2fe015656b7bbc7bd0a2deb06fae885 Mon Sep 17 00:00:00 2001 From: Kaushik Deka Date: Mon, 10 Feb 2025 04:34:23 +0000 Subject: [PATCH] file commit miss --- litellm/litellm_core_utils/streaming_handler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/litellm/litellm_core_utils/streaming_handler.py b/litellm/litellm_core_utils/streaming_handler.py index 5e9fb7aa76..2996162bdf 100644 --- a/litellm/litellm_core_utils/streaming_handler.py +++ b/litellm/litellm_core_utils/streaming_handler.py @@ -1263,8 +1263,9 @@ class CustomStreamWrapper: and "function" in tool and isinstance(tool["function"], dict) and ("type" not in tool or tool["type"] is None) + and tool.get('id') ): - # if function returned but type set to None - mistral's api returns type: None + # Refer to the test test_function_calling_tool_type tool["type"] = "function" model_response.choices[0].delta = Delta(**_json_delta) except Exception as e: