Skip to content

Handle Double Quotes and Newline Chars in Gemma-4 Tool Call Arguments#7477

Open
mamei16 wants to merge 9 commits intooobabooga:devfrom
mamei16:fix_gemma_tool_args
Open

Handle Double Quotes and Newline Chars in Gemma-4 Tool Call Arguments#7477
mamei16 wants to merge 9 commits intooobabooga:devfrom
mamei16:fix_gemma_tool_args

Conversation

@mamei16
Copy link
Copy Markdown
Contributor

@mamei16 mamei16 commented Apr 8, 2026

Fixes #7476

Checklist:

@oobabooga
Copy link
Copy Markdown
Owner

This looks correct. I wonder if bare backslashes in values (Windows paths, regex patterns, etc.) could still break things, since the template doesn't escape them either. Would parts[idx] = json.dumps(parts[idx])[1:-1] on the odd parts work as an alternative?

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.

2 participants