diff --git a/local_plugins/chat_api/ios/chat_api/Sources/chat_api/ChatApiService.swift b/local_plugins/chat_api/ios/chat_api/Sources/chat_api/ChatApiService.swift index 524feda90..8c6a37f0f 100644 --- a/local_plugins/chat_api/ios/chat_api/Sources/chat_api/ChatApiService.swift +++ b/local_plugins/chat_api/ios/chat_api/Sources/chat_api/ChatApiService.swift @@ -524,14 +524,16 @@ getSessionCallback(sessionId)?.onFunctionCall(sessionId, jsonFunctionCall) functionCall, result ) - - // 将结果发送回OpenAI继续对话 - await self.sendFunctionCallResultInternal( - sessionId: sessionId, - messages: self.currentMessages, - functionCall: functionCall, - functionResult: self.jsonToString(result) ?? "{}" - ) + if (firstToolCall.name != "set_user_profile_field"){ + // 将结果发送回OpenAI继续对话 + await self.sendFunctionCallResultInternal( + sessionId: sessionId, + messages: self.currentMessages, + functionCall: functionCall, + functionResult: self.jsonToString(result) ?? "{}" + ) + } + } } } catch {