Generating based off the latest preview surface (2024-02-15).
TTS is the big feature for this revision and there have been some minor renames for some of the BYOD options.
Fixes#22444
A UnmarshalJSON method has been added to the ChatCompletionsToolChoice and ChatRequestUserMessageContent structs. These implementations allow the structs to satisfy the json.Unmarshaller interface, enabling them to decode JSON directly into their respective types.
Fixing issue where you can't use whisper with m4a files.
* It's one of the formats that doesn't seem to be recognized without an explicit file extension, which you can pass via Filename
* My tests were too heavily dependent on implementation details of the models. Changing this out to check that things are working correctly without checking the exact contents of the response.
* Also, rerecorded tests since we're doing multiple audio tests as well.
Fixes#22195
- Do proper test recordings for audio so we can enable those.
- Bring back vision, and also target Azure.
Overall, this brings our test coverage back up to 32% from 24%.
Fixes#21598
Generating based on the latest swagger for the 2023-12-01 API:
- Chat message types for requests and responses are now different, with fields that are relevant to each more clearly called out. For instance, fields relevant to only assistant type messages (like tools) are separated properly.
- Strong types for OYD (ie, bring your own data) scenarios, instead of a `any` parameter.
- General updates to just expose new features for models like Dall-E
Also, improved the tests a bit to handle the fact that we're often going to several different Azure OpenAI instances for different models, developing features, etc...
Changing out our strategy a bit here. Some calls take a bit or, when they 429, they return a "retry-after" header that can be up to a minute long.
- I've removed the automatic "retry 60 times" policy for OpenAI. This might have to come back, but I'd like to see how well our runs do without it on.
- I've added in a more retries for the whisper tests.
- I've increased the overall time for the CI/Live test jobs to be 30m, instead of 10m, which they are by default.
- Updating to use the common azcore.KeyCredential instead of a custom KeyCredential type.
- Fixing more OpenAI tests to allow for throttling, and to skip the test.
Fixes https://github.com/Azure/azure-sdk-for-go/issues/21529
Adding in support for chat extensions which allow you (in Azure OpenAI) to use your own data from a Cognitive Search index.
Also, updated the example files to use the `context.TODO()` consistently, and to use our new "comment + panic" in testable examples.
Fixes#21373
Part of the fix for #21260.
- Moved the code (to preserve history) into `ai/azopenai`
- Marked `cognitiveservices/azopenai`, prepping to release one last release to deprecate it.
We still need to submit an issue to de-list `cognitiveservices/azopenai` but I believe this takes care of our end.