Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: deprecate function return in new test #2309

Merged
merged 1 commit into from
Dec 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,16 +400,16 @@ def always_error():

response_message = None
for message in response.messages:
if isinstance(message, FunctionReturn):
if isinstance(message, ToolReturnMessage):
response_message = message
break

assert response_message, "FunctionReturn message not found in response"
assert response_message, "ToolReturnMessage message not found in response"
assert response_message.status == "error"
if isinstance(client, RESTClient):
assert response_message.function_return == "Error executing function always_error: ZeroDivisionError: division by zero"
assert response_message.tool_return == "Error executing function always_error: ZeroDivisionError: division by zero"
else:
response_json = json.loads(response_message.function_return)
response_json = json.loads(response_message.tool_return)
assert response_json['status'] == "Failed"
assert response_json['message'] == "Error executing function always_error: ZeroDivisionError: division by zero"

Expand Down
Loading