diff --git a/common/chat-template.hpp b/common/chat-template.hpp index 1e58a7d1f..d9e3e8c69 100644 --- a/common/chat-template.hpp +++ b/common/chat-template.hpp @@ -89,7 +89,7 @@ class chat_template { if (_requires_object_arguments || !_supports_system_role || !_supports_tools) { actual_messages = json::array(); - + std::string pending_system; auto flush_sys = [&]() { if (!pending_system.empty()) { @@ -154,7 +154,7 @@ class chat_template { }; if (message.contains("tool_call_id")) { obj["tool_response"]["tool_call_id"] = message.at("tool_call_id"); - } + } message["content"] = obj.dump(2); message.erase("name"); } diff --git a/examples/agent/README.md b/examples/agent/README.md index 79e31fc4e..b115a8d2e 100644 --- a/examples/agent/README.md +++ b/examples/agent/README.md @@ -24,12 +24,12 @@ Here's how to run an agent w/ local tool call: ./llama-server --jinja -fa --verbose \ -hfr bartowski/gemma-2-2b-it-GGUF -hff gemma-2-2b-it-Q4_K_M.gguf | | - + # Native support for Mistral Nemo, Qwen 2.5, Hermes 3, Functionary 3.x # Note that some of these GGUFs lack the right template, so we override it # (otherwise they'd use the generic tool call support, which may be less efficient # and consume more tokens) - + ./llama-server --jinja -fa -ctk q4_0 -ctv q4_0 --verbose \ -hfr bartowski/Qwen2.5-7B-Instruct-GGUF -hff Qwen2.5-7B-Instruct-Q4_K_M.gguf