for (const common_chat_tool_call & tool_call : oaicompat_msg.tool_calls) {
output.push_back(json {
+ {"id", "fc_" + tool_call.id},
{"type", "function_call"},
{"status", "completed"},
{"arguments", tool_call.arguments},
- {"call_id", "fc_" + tool_call.id},
+ {"call_id", "call_" + tool_call.id},
{"name", tool_call.name},
});
}
for (const common_chat_tool_call & tool_call : oaicompat_msg.tool_calls) {
const json output_item = {
+ {"id", "fc_" + tool_call.id},
{"type", "function_call"},
{"status", "completed"},
{"arguments", tool_call.arguments},
- {"call_id", "fc_" + tool_call.id},
+ {"call_id", "call_" + tool_call.id},
{"name", tool_call.name}
};
server_sent_events.push_back(json {
{"data", json {
{"type", "response.output_item.added"},
{"item", json {
+ {"id", "fc_" + diff.tool_call_delta.id},
{"arguments", ""},
- {"call_id", "fc_" + diff.tool_call_delta.id},
+ {"call_id", "call_" + diff.tool_call_delta.id},
{"name", diff.tool_call_delta.name},
{"type", "function_call"},
{"status", "in_progress"},