Add ToolSupportProvider

This commit is contained in:
hlohaus 2025-03-01 10:16:39 +01:00
parent fa086e23af
commit a0e8559fc3

View file

@ -152,7 +152,7 @@ class MyModel(BaseModel):
# Create the agent for a model with tool support (using one tool) # Create the agent for a model with tool support (using one tool)
agent = Agent(AIModel( agent = Agent(AIModel(
"PollinationsAI:gpt-4o", # Specify the provider and model "PollinationsAI:openai", # Specify the provider and model
ToolSupportProvider # Use ToolSupportProvider to handle tool-based response formatting ToolSupportProvider # Use ToolSupportProvider to handle tool-based response formatting
), result_type=MyModel, model_settings=ModelSettings(temperature=0)) ), result_type=MyModel, model_settings=ModelSettings(temperature=0))