Replies: 1 comment 3 replies
-
We previously tried and had to revert it. The OpenAI rules are too strict and end up breaking lots of consumption, especially when used with arbitrary MCP tools. Note that it's not the default for the OpenAI clients when used directly, either: you have to opt-in. You can opt-in via IChatClient by putting "strictJsonSchema"=true into AdditionalProperties for either the ChatOptions you're using or the specific AIFunction in question. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When using an OpenAI provider, the strict option for the JSON schema is not set so it will only be best effort only which I feel like is not the expected behavior when using
IChatClient.GetResponseAsync<T>
.It the OpenAI doc, it states
Would it make sense to always enable strict mode?
Beta Was this translation helpful? Give feedback.
All reactions