mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-23 03:19:41 +00:00
Merge pull request #3350 from taiwan-dog/pm/hello-before-mcp-initialize
fix: send server hello before MCP initialize
This commit is contained in:
commit
046fdc8aa4
1 changed files with 4 additions and 2 deletions
|
|
@ -54,14 +54,16 @@ async def handleHelloMessage(conn: "ConnectionHandler", msg_json):
|
|||
if features.get("mcp"):
|
||||
conn.logger.bind(tag=TAG).debug("客户端支持MCP")
|
||||
conn.mcp_client = MCPClient()
|
||||
# 发送初始化
|
||||
asyncio.create_task(send_mcp_initialize_message(conn))
|
||||
if features.get("aec"):
|
||||
conn.logger.bind(tag=TAG).debug("客户端启用了服务端AEC")
|
||||
conn.client_aec = True
|
||||
|
||||
await conn.websocket.send(json.dumps(conn.welcome_msg))
|
||||
|
||||
# The device waits for the server hello before processing MCP messages.
|
||||
if features and features.get("mcp"):
|
||||
asyncio.create_task(send_mcp_initialize_message(conn))
|
||||
|
||||
|
||||
async def checkWakeupWords(conn: "ConnectionHandler", text):
|
||||
enable_wakeup_words_response_cache = conn.config[
|
||||
|
|
|
|||
Loading…
Reference in a new issue