From 319453a90f8690fc1d708a2b3c23e8245bedb595 Mon Sep 17 00:00:00 2001 From: martsforever Date: Thu, 11 Sep 2025 00:51:28 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20create=5Fllm=20=E4=BC=A0=E9=80=92=20dis?= =?UTF-8?q?able=5Fstreaming?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/utils/llm_utils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/utils/llm_utils.py b/app/utils/llm_utils.py index a0ea91c..2ac93b0 100644 --- a/app/utils/llm_utils.py +++ b/app/utils/llm_utils.py @@ -6,7 +6,11 @@ from app.config.ai_configs import ai_configs from app.utils.LLamaIndexEmbeddings import LLamaIndexEmbeddings -def create_llm(platform_code='huoshan-doubao', temperature=0.5): +def create_llm( + platform_code='huoshan-doubao', + temperature=0.5, + disable_streaming=False, +): _ai_config = ai_configs.get(platform_code) if _ai_config is None: @@ -17,6 +21,7 @@ def create_llm(platform_code='huoshan-doubao', temperature=0.5): api_key=_ai_config.get('key'), model=_ai_config.get('model'), temperature=temperature, + disable_streaming=disable_streaming, )