How do I enable "strict" mode? in #247
Answered
by
ilvalerione
samehdoush
asked this question in
Q&A
-
|
The responses to Structured Output are unbalanced. Sometimes they work, sometimes they don't. error : |
Beta Was this translation helpful? Give feedback.
Answered by
ilvalerione
Aug 9, 2025
Replies: 1 comment
-
|
Hi @samehdoush, I released a patch to allow the usage of strict mode in OpenAI. You can pass the strict field creating the OpenAI provider instance: new OpenAI(
$_ENV['OPENAI_API_KEY'],
'gpt-4o-mini',
['response_format' => ['json_schema' => ['strict' => true]]]
) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
samehdoush
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @samehdoush, I released a patch to allow the usage of strict mode in OpenAI. You can pass the strict field creating the OpenAI provider instance: