Comment

Comment by alyt

> Every time I need to specify output schema for LLMs, I need to write a converter from Pydantic models to the schema. Pydantic V2's model_json_schema is not supported by some platforms like OpenAI or n8n.

Interesting idea; I'm not familiar with n8n, but doesn't OpenAI's API natively support Pydantic models? You can just pass in the model directly as the `response_format` argument: https://platform.openai.com/docs/guides/structured-outputs?a...

Definitely possible I'm missing which use cases you're thinking of. Would be cool to see some more concrete examples of how this has been useful for you!

parent alyt 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton