server: fix format of streamed tool call deltas (diff name, fix id location) (#13800)

* fix deltas of tool_call.function.name

* fix tool_call.id (was in tool_call.function.id!) + add function type

* add tool_call.type

* populate empty tool_call.function.arguments on first delta
This commit is contained in:
Olivier Chafik
2025-05-26 06:56:49 -07:00
committed by GitHub
parent f13847cfb5
commit d74e94c1b3
3 changed files with 17 additions and 17 deletions

View File

@ -1356,8 +1356,7 @@ static void test_msg_diffs_compute() {
common_chat_msg_diff diff12;
diff12.tool_call_index = 0;
diff12.tool_call_delta.name = "special_function";
// Note: id doesnt change here.
// Note: neither id nor name change here.
diff12.tool_call_delta.arguments = "g1\": 1}";
assert_equals(