mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-23 03:19:41 +00:00
补充形参
This commit is contained in:
parent
3bf619e2dd
commit
f441703e6c
2 changed files with 4 additions and 4 deletions
|
|
@ -1370,7 +1370,7 @@ class ConnectionHandler:
|
|||
|
||||
# 统一处理工具调用结果
|
||||
if tool_results:
|
||||
self._handle_function_result(tool_results, depth=depth, streamed_text=streamed_text)
|
||||
self._handle_function_result(tool_results, depth=depth, streamed_text=streamed_text, speaker=speaker)
|
||||
|
||||
# 存储对话内容
|
||||
if len(response_message) > 0:
|
||||
|
|
@ -1395,7 +1395,7 @@ class ConnectionHandler:
|
|||
|
||||
return True
|
||||
|
||||
def _handle_function_result(self, tool_results, depth, streamed_text=""):
|
||||
def _handle_function_result(self, tool_results, depth, streamed_text="", speaker=None):
|
||||
need_llm_tools = []
|
||||
record_tools = []
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ async def handle_user_intent(conn: "ConnectionHandler", text, speaker=None):
|
|||
# 会话开始时生成sentence_id
|
||||
conn.sentence_id = str(uuid.uuid4().hex)
|
||||
# 处理各种意图
|
||||
return await process_intent_result(conn, intent_result, text)
|
||||
return await process_intent_result(conn, intent_result, text, speaker=speaker)
|
||||
|
||||
|
||||
async def check_direct_exit(conn: "ConnectionHandler", text):
|
||||
|
|
@ -81,7 +81,7 @@ async def analyze_intent_with_llm(conn: "ConnectionHandler", text):
|
|||
|
||||
|
||||
async def process_intent_result(
|
||||
conn: "ConnectionHandler", intent_result, original_text
|
||||
conn: "ConnectionHandler", intent_result, original_text, speaker=None
|
||||
):
|
||||
"""处理意图识别结果"""
|
||||
try:
|
||||
|
|
|
|||
Loading…
Reference in a new issue