Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it possible to change the $ref strategy of zod-to-json-schema #1134

Open
1 task done
FredrikNoren opened this issue Oct 16, 2024 · 1 comment
Open
1 task done

Comments

@FredrikNoren
Copy link

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

The "extract-to-root" strategy is not working for my types, but I tried changing the strategy to "none" which seems to work. It would be nice to be able to just pass down which strategy to use through zodFunction

Additional context

No response

@jovermier
Copy link

I have tested with the default extract-to-root and none with some surprising results. For a complex zod schema using extract-to-root schema uses 3 times as many input tokens than none. Your mileage may vary if using on simple schema. I have not observed any downsides when using none.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants