This commit is contained in:
oobabooga
2026-04-14 20:28:55 -07:00
parent 4e978dd037
commit b06b36a6a6

View File

@@ -470,7 +470,7 @@ def _parse_gemma4_tool_calls(answer: str, tool_names: list[str]):
if idx % 2 == 0:
parts[idx] = re.sub(r'(^|[{,\[])\s*(\w+)\s*:', r'\1"\2":', parts[idx])
else:
parts[idx] = json.dumps(parts[idx])[1:-1]
parts[idx] = json.dumps(parts[idx])[1:-1]
json_str = '"'.join(parts)
try: