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() {