mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-29 05:09:46 +01:00
fix: 退出指令无法识别
修复指令text包含标点的情况下,无法正确识别退出指令的问题
This commit is contained in:
parent
29d59b3974
commit
59572fc58b
1 changed files with 2 additions and 0 deletions
|
|
@ -2,6 +2,7 @@ from config.logger import setup_logging
|
|||
import json
|
||||
from core.handle.sendAudioHandle import send_stt_message
|
||||
from core.utils.dialogue import Message
|
||||
from core.utils.util import remove_punctuation_and_length
|
||||
from config.functionCallConfig import FunctionCallConfig
|
||||
import asyncio
|
||||
from enum import Enum
|
||||
|
|
@ -105,6 +106,7 @@ async def handle_user_intent(conn, text):
|
|||
|
||||
async def check_direct_exit(conn, text):
|
||||
"""检查是否有明确的退出命令"""
|
||||
_, text = remove_punctuation_and_length(text)
|
||||
cmd_exit = conn.cmd_exit
|
||||
for cmd in cmd_exit:
|
||||
if text == cmd:
|
||||
|
|
|
|||
Loading…
Reference in a new issue