Skip to content

Error thrown after updating package. How to fix it? [invalid_function_parameters] #6291

Answered by stephentoub
flintlouis asked this question in Q&A
Discussion options

You must be logged in to vote

Two things:

  1. The latest release includes a change to Microsoft.Extensions.AI.OpenAI that turns on OpenAI's strict mode by default; "strict" is beneficial in that OpenAI then guarantees that the generated results will match the specific schema, but to do that they also impose more constraints on what the schema can be. In this case, the generated schema is running afoul of these constraints. We've realized that this change was a mistake and are reverting it in #6285. In the meantime, you should be able to workaround this by changing your AIFunctionFactory.Create call to be AIFunctionFactory.Create(SetFoo, new() { AdditionalProperties = new Dictionary<string, object?>() { ["Strict"] = false })

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@flintlouis
Comment options

Answer selected by flintlouis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants