Add a response template and fix tool calls with null content

#8
by Rocketknight1 HF Staff - opened

Assistant tool-call messages with content: None, as OpenAI-format clients send them, no longer put a literal None in the prompt (the same fix as GLM-5.3's template); it should work in Transformers, llama.cpp and vLLM. Also adds a response template, so Transformers' parse_response turns the model's output back into a message (reasoning, content and tool calls), matching vLLM's own GLM parser. Supersedes #4, which used the old response_schema key.

Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment