From 83145486b05b609812d696878c0ebefd6ab997de Mon Sep 17 00:00:00 2001 From: VoidIsVoid <343750470@qq.com> Date: Mon, 18 Mar 2024 13:17:16 +0800 Subject: [PATCH] fix: fix unstable function call response arguments missing (#2872) --- api/core/model_runtime/model_providers/openai/llm/llm.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/core/model_runtime/model_providers/openai/llm/llm.py b/api/core/model_runtime/model_providers/openai/llm/llm.py index 2ea65780f1..46f17fe19b 100644 --- a/api/core/model_runtime/model_providers/openai/llm/llm.py +++ b/api/core/model_runtime/model_providers/openai/llm/llm.py @@ -656,6 +656,8 @@ class OpenAILargeLanguageModel(_CommonOpenAI, LargeLanguageModel): if assistant_message_function_call: # start of stream function call delta_assistant_message_function_call_storage = assistant_message_function_call + if delta_assistant_message_function_call_storage.arguments is None: + delta_assistant_message_function_call_storage.arguments = '' if not has_finish_reason: continue