From a34f439226039429def142c4c5fb714c3a931e8d Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Tue, 10 Jun 2025 18:36:26 +0800 Subject: [PATCH] fix: update summary output condition and adjust max-width in ChatBoxPage --- .../pipeline/process_stage/method/llm_request.py | 16 +++++++++------- dashboard/src/views/ChatBoxPage.vue | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/astrbot/core/pipeline/process_stage/method/llm_request.py b/astrbot/core/pipeline/process_stage/method/llm_request.py index c2f91399c..30e9f3352 100644 --- a/astrbot/core/pipeline/process_stage/method/llm_request.py +++ b/astrbot/core/pipeline/process_stage/method/llm_request.py @@ -317,7 +317,7 @@ class LLMRequestSubStage(Stage): f"{cleaned_text}\n" "Only output the summary within 10 words, DO NOT INCLUDE any other text." "You must use the same language as the user." - "If you think the dialog is too short to summarize, just output a special mark: `_None_`" + "If you think the dialog is too short to summarize, only output a special mark: `None`" ), ) if llm_resp and llm_resp.completion_text: @@ -325,7 +325,7 @@ class LLMRequestSubStage(Stage): f"WebChat 对话标题生成响应: {llm_resp.completion_text.strip()}" ) title = llm_resp.completion_text.strip() - if not title or "_None_" in title: + if not title or "None" == title: return await self.conv_manager.update_conversation_title( event.unified_msg_origin, title=title @@ -341,11 +341,13 @@ class LLMRequestSubStage(Stage): cid=cid, title=title, ) - web_chat_back_queue.put_nowait({ - "type": "update_title", - "cid": cid, - "data": title, - }) + web_chat_back_queue.put_nowait( + { + "type": "update_title", + "cid": cid, + "data": title, + } + ) async def _handle_llm_response( self, diff --git a/dashboard/src/views/ChatBoxPage.vue b/dashboard/src/views/ChatBoxPage.vue index 5bbbfe08d..45b23ec18 100644 --- a/dashboard/src/views/ChatBoxPage.vue +++ b/dashboard/src/views/ChatBoxPage.vue @@ -20,7 +20,7 @@ import ChatPage from './ChatPage.vue'; #container { min-width: 600px; min-height: 370px; - max-width: 1200px; + max-width: 1100px; max-height: 860px; padding: 36px; }