Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You might be using JSON mode, which doesn’t guarantee a schema will be followed, or structured outputs not in strict mode. It is possible to get the property that the response is either a valid instance of the schema or an error (eg for refusal)


How do you activate strict mode when using pydantic schemas? It doesn't look like that is a valid parameter to me.

No, I don't get refusals, I see literally invalid json, like: `{"field": ["value...}`




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: