Skip to content

add ability to have z.record part of structured outputs #1196

Closed as not planned
@lifeiscontent

Description

Confirm this is a feature request for the Node library and not the underlying OpenAI API.

  • This is a feature request for the Node library

Describe the feature or improvement you're requesting

I'm currently working on a tool that provides edits to records the shape looks like:

model: string[][]

updates to model: Record<number, Record<number, string>>

the reason why this shape is ideal is because we can keep an in-memory lookup of all the "rows" and "columns" that have been edited and z.record is a good use case for this shape because we obviously don't need the entire array to be returned, just the edits. currently when using strict: true inside of a run, this kind of schema fails.

Additional context

No response

Metadata

Assignees

No one assigned

    Labels

    openai apiRelated to underlying OpenAI API

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions