修复标题语种自适应
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user