Support for structured output

#4
by s-yanev - opened

Adds a structured_output mode to the GLM-4 chat template that:

  • Suppresses tool definitions when active β€” irrelevant for schema-constrained output
  • Rewrites the first system prompt to enforce JSON-only output against a provided schema, disabling markdown, prose, and chain-of-thought
s-yanev changed pull request status to closed

This don't work properly when thinking is enabled. Closing the PR.

Sign up or log in to comment