From dfc581ff6c9f7ce9f7edd77a0d28190bea0df546 Mon Sep 17 00:00:00 2001 From: Doiiars Date: Sun, 9 Nov 2025 17:06:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=81=E5=BC=8F=E4=BC=A0?= =?UTF-8?q?=E8=BE=93=E9=87=8D=E8=AF=95=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- InsightEngine/llms/base.py | 2 +- MediaEngine/llms/base.py | 2 +- QueryEngine/llms/base.py | 2 +- ReportEngine/llms/base.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/InsightEngine/llms/base.py b/InsightEngine/llms/base.py index 48a5157..090c10c 100644 --- a/InsightEngine/llms/base.py +++ b/InsightEngine/llms/base.py @@ -83,7 +83,6 @@ class LLMClient: return self.validate_response(response.choices[0].message.content) return "" - @with_retry(LLM_RETRY_CONFIG) def stream_invoke(self, system_prompt: str, user_prompt: str, **kwargs) -> Generator[str, None, None]: """ 流式调用LLM,逐步返回响应内容 @@ -131,6 +130,7 @@ class LLMClient: logger.error(f"流式请求失败: {str(e)}") raise e + @with_retry(LLM_RETRY_CONFIG) def stream_invoke_to_string(self, system_prompt: str, user_prompt: str, **kwargs) -> str: """ 流式调用LLM并安全地拼接为完整字符串(避免UTF-8多字节字符截断) diff --git a/MediaEngine/llms/base.py b/MediaEngine/llms/base.py index 4cbb3ca..888b0a5 100644 --- a/MediaEngine/llms/base.py +++ b/MediaEngine/llms/base.py @@ -86,7 +86,6 @@ class LLMClient: return self.validate_response(response.choices[0].message.content) return "" - @with_retry(LLM_RETRY_CONFIG) def stream_invoke(self, system_prompt: str, user_prompt: str, **kwargs) -> Generator[str, None, None]: """ 流式调用LLM,逐步返回响应内容 @@ -134,6 +133,7 @@ class LLMClient: logger.error(f"流式请求失败: {str(e)}") raise e + @with_retry(LLM_RETRY_CONFIG) def stream_invoke_to_string(self, system_prompt: str, user_prompt: str, **kwargs) -> str: """ 流式调用LLM并安全地拼接为完整字符串(避免UTF-8多字节字符截断) diff --git a/QueryEngine/llms/base.py b/QueryEngine/llms/base.py index 399ab65..8acc6cf 100644 --- a/QueryEngine/llms/base.py +++ b/QueryEngine/llms/base.py @@ -83,7 +83,6 @@ class LLMClient: return self.validate_response(response.choices[0].message.content) return "" - @with_retry(LLM_RETRY_CONFIG) def stream_invoke(self, system_prompt: str, user_prompt: str, **kwargs) -> Generator[str, None, None]: """ 流式调用LLM,逐步返回响应内容 @@ -131,6 +130,7 @@ class LLMClient: logger.error(f"流式请求失败: {str(e)}") raise e + @with_retry(LLM_RETRY_CONFIG) def stream_invoke_to_string(self, system_prompt: str, user_prompt: str, **kwargs) -> str: """ 流式调用LLM并安全地拼接为完整字符串(避免UTF-8多字节字符截断) diff --git a/ReportEngine/llms/base.py b/ReportEngine/llms/base.py index 64e34ac..29723c5 100644 --- a/ReportEngine/llms/base.py +++ b/ReportEngine/llms/base.py @@ -76,7 +76,6 @@ class LLMClient: return self.validate_response(response.choices[0].message.content) return "" - @with_retry(LLM_RETRY_CONFIG) def stream_invoke(self, system_prompt: str, user_prompt: str, **kwargs) -> Generator[str, None, None]: """ 流式调用LLM,逐步返回响应内容 @@ -118,6 +117,7 @@ class LLMClient: logger.error(f"流式请求失败: {str(e)}") raise e + @with_retry(LLM_RETRY_CONFIG) def stream_invoke_to_string(self, system_prompt: str, user_prompt: str, **kwargs) -> str: """ 流式调用LLM并安全地拼接为完整字符串(避免UTF-8多字节字符截断)