Skip to content

Is output_type the same when set in .run() as when set in the Agent? #2934

@YanSte

Description

@YanSte

Question

Hi Pydantic AI,

Simple question, Is output_type the same when set in .run() as when set in the Agent?

Because they is not mention in the documentation.

Additional Context

result = await agent.run(
...
output_type=Response,
)

# And

Agent(
...
output_type=Response,
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions