Skip to content

Commit

Permalink
[azopenai] Updating to the latest 2023-12-01 API (#22081)
Browse files Browse the repository at this point in the history
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...
  • Loading branch information
richardpark-msft authored Dec 7, 2023
1 parent 837ae16 commit 423e02b
Show file tree
Hide file tree
Showing 39 changed files with 4,992 additions and 1,834 deletions.
2 changes: 1 addition & 1 deletion eng/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
},
{
"Name": "azopenai",
"CoverageGoal": 0.34
"CoverageGoal": 0.24
},
{
"Name": "aztemplate",
Expand Down
20 changes: 15 additions & 5 deletions sdk/ai/azopenai/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
# Release History

## 0.4.0 (Unreleased)
## 0.4.0 (2023-12-07)

Support for many of the features mentioned in OpenAI's November Dev Day and Microsoft's 2023 Ignite conference

### Features Added

- Chat completions has been extended to accomodate new features:
- Parallel function calling via Tools. See the function `ExampleClient_GetChatCompletions_functions` in `example_client_getchatcompletions_extensions_test.go` for an example of specifying a Tool.
- "JSON mode", via `ChatCompletionOptions.ResponseFormat` for guaranteed function outputs.
- ChatCompletions can now be used with both text and images using `gpt-4-vision-preview`.
- Azure enhancements to `gpt-4-vision-preview` results that include grounding and OCR features
- GetImageGenerations now works with DallE-3.
- `-1106` model feature support for `gpt-35-turbo` and `gpt-4-turbo`, including use of a seed via `ChatCompletionsOptions.Seed` and system fingerprints returned in `ChatCompletions.SystemFingerprint`.
- `dall-e-3` image generation capabilities via `GetImageGenerations`, featuring higher model quality, automatic prompt revisions by `gpt-4`, and customizable quality/style settings

### Breaking Changes

- `azopenai.KeyCredential` has been replaced by [azcore.KeyCredential](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore#KeyCredential).

### Bugs Fixed

### Other Changes
- `Deployment` has been renamed to `DeploymentName` throughout all APIs.
- `CreateImage` has been replaced with `GetImageGenerations`.
- `ChatMessage` has been split into per-role types. The function `ExampleClient_GetChatCompletions` in `example_client_getcompletions_test.go` shows an example of this.

## 0.3.0 (2023-09-26)

Expand Down
2 changes: 1 addition & 1 deletion sdk/ai/azopenai/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "go",
"TagPrefix": "go/ai/azopenai",
"Tag": "go/ai/azopenai_5ce13f37c4"
"Tag": "go/ai/azopenai_9ed7d01267"
}
Loading

0 comments on commit 423e02b

Please sign in to comment.