Fix for issue 69 when using structured output for AOAI
Fix for issue 69 when using structured output for AOAI: 'You tried to pass a BaseModel class to chat.completions.create(); You must use beta.chat.completions.parse() instead. Basically an upgrade of AOAI client library to cover version 2024-08-06 of gpt-4o model supporting structured outputs.
@vincentgiraud please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
@microsoft-github-policy-service agree [company="{your company}"]Options:
- (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
- (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"Contributor License Agreement
@microsoft-github-policy-service agree company="Microsoft"
Makes total sense - is this backward compatible (i.e. the older things work too?)
I run all tests successfully including the new one for the structured output prompty file with the gpt-4o model 2024-08-06 (api version 2024-08-01-preview)
As discussed @sethjuarez, I have created a separate invoker (azure_beta with alias azure_openai_beta) for the beta command in charge of the structured output and whetever will come next as beta. So the "older things" are left untouched.
Both invokers share the same processor (under azure). I reran all tests on gpt-35-turbo and gpt-4 (including the new one on gpt-4o-2024-08-06 with structured output) with real calls succesfully.
Will you take care of updating the prompty.yaml vscode extension with the new azure_openai_beta configuration type?
Any ETA for this?
Any date for a final review? It's additional work to merge and retest as it diverges over time from the upstream. This is a functionality asked by customers. Thanks!