fix: 唤醒机制

This commit is contained in:
Sakura-RanChen
2025-09-02 11:18:04 +08:00
parent b4f4995ff9
commit c428a9ddee
15 changed files with 848 additions and 145 deletions
@@ -3,6 +3,7 @@ import uuid
import asyncio
from core.utils.dialogue import Message
from core.providers.tts.dto.dto import ContentType
from core.handle.helloHandle import checkWakeupWords
from plugins_func.register import Action, ActionResponse
from core.handle.sendAudioHandle import send_stt_message
from core.utils.util import remove_punctuation_and_length
@@ -27,6 +28,10 @@ async def handle_user_intent(conn, text):
if await check_direct_exit(conn, filtered_text):
return True
# 检查是否是唤醒词
if await checkWakeupWords(conn, filtered_text):
return True
if conn.intent_type == "function_call":
# 使用支持function calling的聊天方法,不再进行意图分析
return False