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

feeding instructor a json schema instead of zod schema #188

Open
rgarcia opened this issue Jul 3, 2024 · 0 comments
Open

feeding instructor a json schema instead of zod schema #188

rgarcia opened this issue Jul 3, 2024 · 0 comments

Comments

@rgarcia
Copy link

rgarcia commented Jul 3, 2024

I'm trying to use LLMs to generate OpenAPI schemas, and running into some roadblocks trying to use instructor. It mainly boils down to the fact that zod + typescript types don't really work well when schemas are recursive (OpenAPI specs have lots of recursion). It also seems weird that I'm doing all this work to convert the OpenAPI schema to zod when they publish a JSON schema.

How would you go about doing this? I've peaked at how instructor-js works and I'm tempted to use some of the primitives in zod-stream there and kind of roll-my-own thing similar to instructor but based on json schema instead of zod. I'm hoping you have better ideas :)

Thanks for building instructor!

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

1 participant