-
Notifications
You must be signed in to change notification settings - Fork 965
Toolsets #2024
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
base: main
Are you sure you want to change the base?
Conversation
# Conflicts: # tests/models/test_openai.py
# Conflicts: # pydantic_ai_slim/pydantic_ai/_output.py # pydantic_ai_slim/pydantic_ai/models/openai.py # tests/models/test_openai.py
….)', less 'output_schema.mode == ...'
# Conflicts: # pydantic_ai_slim/pydantic_ai/models/openai.py # pydantic_ai_slim/pydantic_ai/profiles/openai.py # tests/models/test_google.py # tests/models/test_openai_responses.py
# Conflicts: # pydantic_ai_slim/pydantic_ai/_utils.py # pydantic_ai_slim/pydantic_ai/agent.py # tests/models/test_anthropic.py # tests/test_utils.py
PR Change SummaryEnhanced toolset functionality and improved documentation for the Pydantic AI library.
Modified Files
Added Files
How can I customize these reviews?Check out the Hyperlint AI Reviewer docs for more information on how to customize the review. If you just want to ignore it on this PR, you can add the Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add |
Docs Preview
|
a803304
to
49331ee
Compare
# Conflicts: # docs/api/output.md # docs/output.md # pydantic_ai_slim/pydantic_ai/__init__.py # pydantic_ai_slim/pydantic_ai/_agent_graph.py # pydantic_ai_slim/pydantic_ai/_output.py # pydantic_ai_slim/pydantic_ai/_run_context.py # pydantic_ai_slim/pydantic_ai/_utils.py # pydantic_ai_slim/pydantic_ai/agent.py # pydantic_ai_slim/pydantic_ai/models/__init__.py # pydantic_ai_slim/pydantic_ai/models/gemini.py # pydantic_ai_slim/pydantic_ai/models/google.py # pydantic_ai_slim/pydantic_ai/models/openai.py # pydantic_ai_slim/pydantic_ai/output.py # pydantic_ai_slim/pydantic_ai/profiles/__init__.py # pydantic_ai_slim/pydantic_ai/profiles/google.py # pydantic_ai_slim/pydantic_ai/profiles/openai.py # pydantic_ai_slim/pydantic_ai/tools.py # tests/models/cassettes/test_google/test_google_model_structured_output.yaml # tests/models/test_anthropic.py # tests/models/test_gemini.py # tests/models/test_google.py # tests/models/test_openai.py # tests/models/test_openai_responses.py # tests/test_agent.py # tests/test_streaming.py # tests/test_tools.py
Toolset
, take 3 #1973To fix:
MCPToolset
To improve:
MCPServer
a toolset, instead of needingMCPServer.as_toolset()
TODO
commentsTo add:
run
/iter
etc. Should overridetoolsets
passed toAgent
, but not output tools,@agent.tools
tools,Agent(tools=...)
tools, orAgent(mcp_servers=...)
tools. If you want those to be overridden, you should pass them asAgent(toolsets=FunctionToolset(...))
Toolset
, take 3 #1973 (comment)to_chat_completions
method #2041ToolOutput(prepare=...)
: Make output_type be conditionally available #2042