From ae83bc7370c188499e8db259ce347f18b6ad871a Mon Sep 17 00:00:00 2001 From: liangxinbing <1580466765@qq.com> Date: Sun, 30 Mar 2025 23:05:17 +0800 Subject: [PATCH] fix bug of stream for ask_tool --- app/llm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/llm.py b/app/llm.py index 87c59f6..37d493b 100644 --- a/app/llm.py +++ b/app/llm.py @@ -735,8 +735,9 @@ class LLM: temperature if temperature is not None else self.temperature ) + params["stream"] = False # Always use non-streaming for tool requests response: ChatCompletion = await self.client.chat.completions.create( - **params, stream=False + **params ) # Check if response is valid