Skip to content

from_json no longer needed in gemma templates#4365

Merged
dkalinowski merged 2 commits into
mainfrom
gemma-template
Jul 10, 2026
Merged

from_json no longer needed in gemma templates#4365
dkalinowski merged 2 commits into
mainfrom
gemma-template

Conversation

@dkalinowski

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Gemma chat templates to stop relying on from_json for tool-call arguments and to drop rendering of the response field in tool definitions, aligning the template output with the current tool-call/message structures used in OVMS LLM tests and examples.

Changes:

  • Remove rendering of the function.response schema block from the Gemma tool declaration formatter.
  • Update the Gemma example template to render tool-call arguments directly as a mapping (no from_json conversion) and adjust its header note accordingly.
  • Add a short “modifications” header comment to the test Gemma template for parity/clarity.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/test/llm/chat_templates/chat_template_gemma.jinja Removes formatting for the response field in tool definitions and adds a short header note describing the modification.
extras/chat_template_examples/chat_template_gemma.jinja Removes from_json usage and renders function['arguments'] directly when it is a mapping (retaining string fallback).

@dkalinowski dkalinowski merged commit 270e602 into main Jul 10, 2026
2 checks passed
@dkalinowski dkalinowski deleted the gemma-template branch July 10, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants