(no title)
alyt | 11 months ago
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!
NerualNowtork|10 months ago
Yes, if we're talking about coding, luckily we don't need to deal with JSON schema in most cases. But there are places like OpenAI's playground and low-code platforms that don't support Pydantic model definition. I also doubt they will ever add Pydantic support because of the nature of such products.
Besides, I feel we need some automatic prompt engineering for structured output, then it'll probably be better done on JSON schema than on JS/Python code because you can use JSON as part of the prompt. But maybe I'm betting wrong on the future!