fix(tools): validate arguments with jsonschema without coercion (#6648)
Co-authored-by: xiong-wei1 <2318942410@qq.com>
This commit is contained in:
1 parent
25ed91ffeb
commit
8cce73465b
27 files changed
+689
-614
No files matched your search
@@ -163,7 +163,8 @@ async def test_structured_calls_keep_arguments_out_of_text_and_preserve_validati
|
||||
call = result.tool_calls[0]
|
||||
assert (call.id, call.name, call.arguments) == ("call_fixture", "exec_session", arguments)
|
||||
assert tool.validate_params(call.arguments) == (
|
||||
["timeout_ms should be integer"] if isinstance(timeout_ms, dict) else []
|
||||
[f"timeout_ms: {timeout_ms!r} is not of type 'integer', 'null'"]
|
||||
if isinstance(timeout_ms, dict) else []
|
||||
)
|
||||
if stream:
|
||||
assert "".join(deltas) == text
|
||||
|
||||
Reference in new issue
Block a user