Skip to content

Conversation

samuelcolvin
Copy link
Member

Both client and server.

To visualize, needs pydantic/logfire#1103.

Copy link

github-actions bot commented Jun 2, 2025

Docs Preview

commit: 4b315a3
Preview URL: https://cc1c0e78-pydantic-ai-previews.pydantic.workers.dev

if isinstance(content, mcp_types.TextContent):
user_part_content: str | Sequence[messages.UserContent] = content.text
else:
# image content
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use pydantic_ai.mcp._map_tool_result_part here, to cover all types of content?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some type incompatibilities, let's do this later

@samuelcolvin samuelcolvin marked this pull request as ready for review June 18, 2025 19:14
@DouweM DouweM mentioned this pull request Jun 19, 2025
6 tasks
@Kludex Kludex changed the title MCP sampling Support MCP sampling Jun 19, 2025
@Kludex Kludex enabled auto-merge (squash) June 19, 2025 06:15
@Kludex Kludex merged commit be5cda6 into main Jun 19, 2025
16 checks passed
@Kludex Kludex deleted the mcp-sampling branch June 19, 2025 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants