mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-28 10:03:54 +08:00
fix:function call bug (#268)
* 优化function call消息处理 * fix:用户说话重复记录bug * 2025-3-10-优化llm intent (#254) Co-authored-by: 欣南科技 <huangrongzhuang@xin-nan.com> * update:回复上版提示词,无需再二次识别歌曲名 --------- Co-authored-by: 玄凤科技 <eric230308@gmail.com> Co-authored-by: hrz <1710360675@qq.com> Co-authored-by: Jiao Haoyang <108573524+XuSenfeng@users.noreply.github.com>
This commit is contained in:
co-authored by
玄凤科技
hrz
Jiao Haoyang
parent
4f3fae81c1
commit
2b662d3a14
@@ -122,12 +122,10 @@ async def analyze_intent_with_llm(conn, text):
|
||||
logger.bind(tag=TAG).warning("意图识别服务未初始化")
|
||||
return None
|
||||
|
||||
# 创建对话历史记录
|
||||
# 对话历史记录
|
||||
dialogue = conn.dialogue
|
||||
dialogue.put(Message(role="user", content=text))
|
||||
|
||||
try:
|
||||
intent_result = await conn.intent.detect_intent(dialogue.dialogue)
|
||||
intent_result = await conn.intent.detect_intent(dialogue.dialogue, text)
|
||||
logger.bind(tag=TAG).info(f"意图识别结果: {intent_result}")
|
||||
|
||||
# 尝试解析JSON结果
|
||||
|
||||
Reference in New Issue
Block a user