Skip to content

How would you handle Pydantic output_type validation and retries? #530

Closed as not planned
@jackien1

Description

@jackien1

If you want to double check that a property like "pdf_id" that the AI spits out in structured output exists in the database would you just run a while loop checker with max iterations, dynamic model creation of enums or literals, or use AfterValidator? Not sure what is the best practice for this agentic SDK.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionQuestion about using the SDKstale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions