8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e2f78a commit 7aa735fCopy full SHA for 7aa735f
examples/server/server.cpp
@@ -750,7 +750,10 @@ struct server_task_result_cmpl_final : server_task_result {
750
{"name", tc.name},
751
{"arguments", tc.arguments},
752
}},
753
- {"id", tc.id},
+ // Some templates generate and require and id (sometimes in a very specific format).
754
+ // We only generate a random id for the ones that don't generate one by themselves
755
+ // (they also won't get to see it as their template likely doesn't use it, so it's all for the client)
756
+ {"id", tc.id.empty() ? gen_tool_call_id() : tc.id},
757
});
758
}
759
message["tool_calls"] = tool_calls;
0 commit comments