Skip to content

Commit 53266f9

Browse files
author
ochafik
committed
better error when wrong function called
1 parent e2ca8be commit 53266f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/server/tests/unit/test_tool_call.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ def do_test_hello_world(server: ServerProcess, **kwargs):
590590
assert tool_calls and len(tool_calls) == 1, f'Expected 1 tool call in {choice["message"]}'
591591
tool_call = tool_calls[0]
592592
assert choice["message"].get("content") in (None, ""), f'Expected no content in {choice["message"]}'
593-
assert tool_call["function"]["name"] == PYTHON_TOOL["function"]["name"]
593+
assert tool_call["function"]["name"] == PYTHON_TOOL["function"]["name"], f'Expected python, got {tool_call["function"]["name"]}'
594594
actual_arguments = json.loads(tool_call["function"]["arguments"])
595595
assert 'code' in actual_arguments, f"code not found in {json.dumps(actual_arguments)}"
596596
code = actual_arguments["code"]

0 commit comments

Comments
 (0)