Skip to content

Structured output validation #189

@dnyg

Description

@dnyg

Hi

I am a bit new to laravel/ai but I have a question regarding agents that implements HasStructuredOutput

If the structured format of the StructuredAgentResponse doesn't follow the format defined in the schema - shouldn't an exception be thrown? Should this happen on the Prism level, the Laravel/Ai level - or am I supposed to do this myself?

I don't really see any point in structured output if I have no guarantee that the result will conform to my schema.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions