Skip to content

Commit

Permalink
Add ToolSupportProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
hlohaus committed Mar 1, 2025
1 parent a0e8559 commit d9f90ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/pydantic_ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ if __name__ == '__main__':

- For instance, if the model generates raw text or unstructured data, the `ToolSupportProvider` will convert this into the expected format (like `MyModel`), allowing the agent to process it as structured data.

- **Model Initialization:** We initialize the agent with the `PollinationsAI:gpt-4o` model, which may not have a built-in API for returning structured outputs. Instead, it relies on the `ToolSupportProvider` to format the output.
- **Model Initialization:** We initialize the agent with the `PollinationsAI:openai` model, which may not have a built-in API for returning structured outputs. Instead, it relies on the `ToolSupportProvider` to format the output.

- **Custom Result Model:** We define a custom Pydantic model (`MyModel`) to capture the expected output in a structured way (e.g., `city` and `country` fields). This helps ensure that even when the model doesn't support structured data, the agent can interpret and format it.

Expand Down

0 comments on commit d9f90ff

Please sign in to comment.