From 0756037be430ea16a7ba57a7fed34b5be72047fc Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Sun, 24 Aug 2025 23:17:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E7=BB=93=E6=9D=9F=E4=BA=A4?= =?UTF-8?q?=E8=B4=A7=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/agent_service/AgentServiceImpl.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/local_plugins/agent_service/ios/agent_service/Sources/agent_service/AgentServiceImpl.swift b/local_plugins/agent_service/ios/agent_service/Sources/agent_service/AgentServiceImpl.swift index 34e162387..5a050b840 100644 --- a/local_plugins/agent_service/ios/agent_service/Sources/agent_service/AgentServiceImpl.swift +++ b/local_plugins/agent_service/ios/agent_service/Sources/agent_service/AgentServiceImpl.swift @@ -1344,11 +1344,17 @@ class ChatApiStreamCallback: StreamCallback { os_log("收到函数调用: %{public}@", log: agentService.logger, type: .info, name) print("onFunctionCall=functionCall\(functionCall)") + if (name == "exit_interaction") { + agentService.stopRecognition() + } + try agentService.sendEvent(name: "function_call", data: [ "name": name, "arguments": functionCall ]) + + }catch{ print("liwei--------------- AI Call onFunctionCall 异常: \(error)") } @@ -1523,7 +1529,7 @@ class AudioPlayer { } func playStopSound() { -// playSound(named: "stop", fileType: "mp3") + playSound(named: "stop", fileType: "mp3") } func playCallingSound() {