| 83 | } |
| 84 | |
| 85 | static void print_usage(const char * program_name) { |
| 86 | LOG_ERR("Usage: %s <template_or_gguf_path> [options]\n", program_name); |
| 87 | LOG_ERR("\nOptions:\n"); |
| 88 | LOG_ERR(" --no-tools Disable tool definitions\n"); |
| 89 | LOG_ERR(" --force-tool-call Set tool calls to forced\n"); |
| 90 | LOG_ERR(" --generation-prompt=0|1 Set add_generation_prompt (default: 1)\n"); |
| 91 | LOG_ERR(" --enable-reasoning=0|1 Enable reasoning parsing (default: 1)\n"); |
| 92 | LOG_ERR(" --output=MODE Output mode: analysis, template, both (default: both)\n"); |
| 93 | LOG_ERR(" --debug-jinja Enable Jinja fine-grained debug\n"); |
| 94 | LOG_ERR(" --input-message=TYPE Message type to render:\n"); |
| 95 | LOG_ERR(" content_only, reasoning_content, tool_call_only,\n"); |
| 96 | LOG_ERR(" content_tool_call, reasoning_tool_call,\n"); |
| 97 | LOG_ERR(" content_fake_tool_call, all\n"); |
| 98 | LOG_ERR("\nExamples:\n"); |
| 99 | LOG_ERR(" %s template.jinja --input-message=all --generation-prompt=1\n", program_name); |
| 100 | LOG_ERR(" %s template.jinja --output=template --input-message=tool_call_only\n", program_name); |
| 101 | } |
| 102 | |
| 103 | static bool parse_bool_option(const std::string & value) { |
| 104 | return value == "1" || value == "true" || value == "yes"; |