Skip to content

Fix handling for nil pointers given user-provided output schema #691

@findleyr

Description

@findleyr

Following up on some discussion in #685: When fixing #199, I was overly cautious about handling typed nils: if the user provided their own output schema, we wouldn't fix typed nils for them, and so returning 'nil' would result in a missing structured output, rather than its zero value.

This was wrong: switching from an inferred schema to a user-provided schema shouldn't change the handling of nil, and structured output, if provided, must be an object.

PR incoming.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions