Skip to content

Fix FunctionGemma parser for escaped braces and multiple calls - #1628

Open
ask-q-ai wants to merge 1 commit into
ml-explore:mainfrom
ask-q-ai:fix/functiongemma-balanced-tool-parser
Open

Fix FunctionGemma parser for escaped braces and multiple calls#1628
ask-q-ai wants to merge 1 commit into
ml-explore:mainfrom
ask-q-ai:fix/functiongemma-balanced-tool-parser

Conversation

@ask-q-ai

Copy link
Copy Markdown

Port the string-aware balanced-brace approach used by the Gemma 4 parser to FunctionGemma.

This preserves braces, quotes, commas and multiline text inside <escape>…<escape> arguments, supports hyphenated function names and multiple calls, and rejects incomplete calls clearly.

Tests cover complete VisMan-like YAML, multiple calls, truncation, and 10,000 fixed-seed source variants.

],
)

def test_function_gemma_parses_ten_thousand_fixed_source_variants(self):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This makes the test very slow, a single test case would be enough.

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.

3 participants