Browse Source

上传iOS代码优化

weicu
liwei1dao 1 year ago
parent
commit
ab30cd1b74
  1. 4
      local_plugins/chat_api/ios/chat_api/Sources/chat_api/ChatApiService.swift

4
local_plugins/chat_api/ios/chat_api/Sources/chat_api/ChatApiService.swift

@ -524,7 +524,7 @@ getSessionCallback(sessionId)?.onFunctionCall(sessionId, jsonFunctionCall)
functionCall, functionCall,
result result
) )
if (firstToolCall.name != "set_user_profile_field"){
// 将结果发送回OpenAI继续对话 // 将结果发送回OpenAI继续对话
await self.sendFunctionCallResultInternal( await self.sendFunctionCallResultInternal(
sessionId: sessionId, sessionId: sessionId,
@ -533,6 +533,8 @@ getSessionCallback(sessionId)?.onFunctionCall(sessionId, jsonFunctionCall)
functionResult: self.jsonToString(result) ?? "{}" functionResult: self.jsonToString(result) ?? "{}"
) )
} }
}
} }
} catch { } catch {
print("[Session: \(sessionId)] 工具调用处理过程中出错: \(error.localizedDescription)") print("[Session: \(sessionId)] 工具调用处理过程中出错: \(error.localizedDescription)")

Loading…
Cancel
Save