Helper to create a tool call with arguments as JSON object
| 179 | |
| 180 | // Helper to create a tool call with arguments as JSON object |
| 181 | static 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 |
| 193 | static json make_user_msg() { |
no outgoing calls
no test coverage detected