Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
fix: update test_tool_schema_parsing.py to use requests.post directly (#8625)
jnjpng089ea415ab9f
diff --git a/tests/test_tool_schema_parsing.py b/tests/test_tool_schema_parsing.pyindex 1083982fa..6db95e05c 100644--- a/tests/test_tool_schema_parsing.py+++ b/tests/test_tool_schema_parsing.py@@ -7,11 +7,12 @@ import timefrom functools import partialimport pytest+import requestsfrom pydantic import BaseModelfrom letta.functions.functions import derive_openai_json_schemafrom letta.functions.schema_generator import validate_google_style_docstring-from letta.llm_api.helpers import convert_to_structured_output, make_post_request+from letta.llm_api.helpers import convert_to_structured_outputfrom letta.schemas.tool import Tool, ToolCreate@@ -185,7 +186,8 @@ def _openai_payload(test_config):"parallel_tool_calls": False,}- make_post_request(url, headers, data)+ response = requests.post(url, headers=headers, json=data)+ response.raise_for_status()success = Trueexcept Exception as e:@@ -306,7 +308,8 @@ def _run_pydantic_args_test(filename, openai_model, structured_output):"parallel_tool_calls": False,}- make_post_request(url, headers, data)+ response = requests.post(url, headers=headers, json=data)+ response.raise_for_status()return (filename, True, None) # Successexcept Exception as e:return (filename, False, str(e)) # Failure with error message