chore(prebuilt): rework structured outputs -- type safety, etc (#5962)

* make `_SchemaSpec` private
* Add ability to customize message used in artificial tool response
This commit is contained in:
Sydney Runkle
2025-08-20 08:52:51 -04:00
committed by GitHub
parent 4151861ca2
commit e670815780
5 changed files with 117 additions and 143 deletions
+1 -1
View File
@@ -433,7 +433,7 @@ def test_react_agent_with_structured_response() -> None:
return "The weather is sunny and 75°F."
expected_structured_response = WeatherResponse(temperature=75)
model = FakeToolCallingModel(
model = FakeToolCallingModel[WeatherResponse](
tool_calls=tool_calls, structured_response=expected_structured_response
)
agent = create_react_agent(