[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
2b7360176b
commit
4b68cac412
2 changed files with 4 additions and 2 deletions
|
|
@ -100,7 +100,7 @@ class TestParser:
|
|||
assert json.loads(result[0]["function"]["arguments"]) == {"command": "echo {foo:bar}"}
|
||||
|
||||
def test_gemma_native_tool_call_bare_string_values(self):
|
||||
text = '<|tool_call>call:get_weather{location:Tokyo,unit:celsius}<tool_call|>'
|
||||
text = "<|tool_call>call:get_weather{location:Tokyo,unit:celsius}<tool_call|>"
|
||||
result = parse_tool_calls_from_text(text)
|
||||
assert len(result) == 1
|
||||
assert json.loads(result[0]["function"]["arguments"]) == {
|
||||
|
|
|
|||
|
|
@ -141,7 +141,9 @@ class TestGemmaNativeStyle:
|
|||
|
||||
def test_bare_unquoted_string_values_are_accepted(self):
|
||||
# Gemma can emit enum/string args unquoted; bare JSON scalars stay typed.
|
||||
text = '<|tool_call>call:get_weather{location:Tokyo,unit:celsius,days:3,live:true}<tool_call|>'
|
||||
text = (
|
||||
"<|tool_call>call:get_weather{location:Tokyo,unit:celsius,days:3,live:true}<tool_call|>"
|
||||
)
|
||||
calls = parse_tool_calls_from_text(text, allow_incomplete = False)
|
||||
assert len(calls) == 1
|
||||
assert json.loads(calls[0]["function"]["arguments"]) == {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue