MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash / build_tool_call

Function build_tool_call

tools/parser/template-analysis.cpp:181–190  ·  view source on GitHub ↗

Helper to create a tool call with arguments as JSON object

Source from the content-addressed store, hash-verified

179
180// Helper to create a tool call with arguments as JSON object
181static json build_tool_call(const std::string & name, const json & args_object, const std::string & id = "call_001") {
182 return json{
183 {"id", id},
184 {"type", "function"},
185 {"function", json{
186 {"name", name},
187 {"arguments", args_object} // Pass as JSON object, not serialized string
188 }}
189 };
190}
191
192// Helper functions to create repeating message definitions
193static json make_user_msg() {

Callers 3

make_assistant_one_toolFunction · 0.70
make_assistant_two_toolsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected