Merge branch 'refs/heads/main' into perf-tool-call-optimization

This commit is contained in:
DaGou12138
2026-04-27 14:23:28 +08:00
27 changed files with 490 additions and 342 deletions
@@ -31,12 +31,12 @@ handle_exit_intent_function_desc = {
"handle_exit_intent", handle_exit_intent_function_desc, ToolType.SYSTEM_CTL
)
def handle_exit_intent(conn: "ConnectionHandler", say_goodbye: str | None = None):
conn.is_exiting = True
# 处理退出意图
try:
if say_goodbye is None:
say_goodbye = "再见,祝您生活愉快!"
conn.close_after_chat = True
if not conn.close_after_chat:
conn.close_after_chat = True
logger.bind(tag=TAG).info(f"退出意图已处理:{say_goodbye}")
return ActionResponse(
action=Action.RESPONSE, result="退出意图已处理", response=say_goodbye