From 44ce5d0786aea7daae9a248ecc97ca83b962c62b Mon Sep 17 00:00:00 2001 From: zcr Date: Tue, 19 May 2026 12:08:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=A0=87=E9=A2=98=E8=AF=AD?= =?UTF-8?q?=E7=A7=8D=E8=87=AA=E9=80=82=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../deep_agent/tools/conversation_title_tool.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/server/deep_agent/tools/conversation_title_tool.py b/src/server/deep_agent/tools/conversation_title_tool.py index 27c3fed..39bb9f2 100755 --- a/src/server/deep_agent/tools/conversation_title_tool.py +++ b/src/server/deep_agent/tools/conversation_title_tool.py @@ -23,15 +23,14 @@ async def conversation_title(agent, config): break prompt = f""" - 请根据以下首次对话内容,生成一个简洁、精准的标题(2-15个字): +Generate a concise and precise title based on the following first-round conversation: +User: {user_msg} +Assistant: {ai_msg} - 用户:{user_msg} - 助手:{ai_msg} - - 要求: - 1. 标题需概括对话核心内容 - 2. 语言简洁、符合中文表达习惯 - 3. 仅返回标题,不要额外解释 +Rules: +1. The title length should be controlled between 2 and 15 characters/word. +2. **The title must be in the same language as the user’s question**. If the user is Chinese, the output will be Chinese, and if the user is English, the output will be English. +3. Only return the pure title, no explanation, no punctuation, no book title. """ response = await qwen_plus_llm.ainvoke(prompt) title = response.content.strip()