From a4f27249ed41d6beab4e42287e662b3d0b06b1f4 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Thu, 10 Apr 2025 14:41:05 +0800 Subject: [PATCH 1/2] fix: openai error --- .../models_provider/impl/openai_model_provider/model/llm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/setting/models_provider/impl/openai_model_provider/model/llm.py b/apps/setting/models_provider/impl/openai_model_provider/model/llm.py index 736976168..2e6dd89ac 100644 --- a/apps/setting/models_provider/impl/openai_model_provider/model/llm.py +++ b/apps/setting/models_provider/impl/openai_model_provider/model/llm.py @@ -30,12 +30,15 @@ class OpenAIChatModel(MaxKBBaseModel, BaseChatOpenAI): @staticmethod def new_instance(model_type, model_name, model_credential: Dict[str, object], **model_kwargs): optional_params = MaxKBBaseModel.filter_optional_params(model_kwargs) + streaming = model_kwargs.get('streaming', True) + if 'o1' in model_name: + streaming = False azure_chat_open_ai = OpenAIChatModel( model=model_name, openai_api_base=model_credential.get('api_base'), openai_api_key=model_credential.get('api_key'), **optional_params, - streaming=True, + streaming=streaming, custom_get_token_ids=custom_get_token_ids ) return azure_chat_open_ai From b0366b18b674126eb7e557860354c3a5d7f6eb65 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud <79562285+wangdan-fit2cloud@users.noreply.github.com> Date: Thu, 10 Apr 2025 16:13:37 +0800 Subject: [PATCH 2/2] fix: Optimize dialogue style (#2849) --- .../component/operation-button/ChatOperationButton.vue | 2 +- ui/src/components/ai-chat/index.scss | 2 +- ui/src/components/ai-chat/index.vue | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue b/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue index 4c6d02d7c..3fc71686f 100644 --- a/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue +++ b/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue @@ -1,7 +1,7 @@