From a6f1ad5b3778dc49671c64b13b69f01e6ed4811e Mon Sep 17 00:00:00 2001 From: zxstty Date: Thu, 21 Aug 2025 16:48:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=A4=A7=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E8=B6=85=E6=97=B6=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/llm/function.py | 1 + apps/llm/reasoning.py | 1 + 2 files changed, 2 insertions(+) diff --git a/apps/llm/function.py b/apps/llm/function.py index 4aac7e1b..89de7fe3 100644 --- a/apps/llm/function.py +++ b/apps/llm/function.py @@ -42,6 +42,7 @@ class FunctionLLM: self._params = { "model": self._config.model, "messages": [], + "timeout": 10 } if self._config.backend == "ollama": diff --git a/apps/llm/reasoning.py b/apps/llm/reasoning.py index fdb36fc0..bc848490 100644 --- a/apps/llm/reasoning.py +++ b/apps/llm/reasoning.py @@ -145,6 +145,7 @@ class ReasoningLLM: temperature=temperature or self._config.temperature, stream=True, stream_options={"include_usage": True}, + timeout=10 ) # type: ignore[] async def call( # noqa: C901, PLR0912, PLR0913 -- Gitee