Skip to content

Commit

Permalink
[OpenAI] Add back beta features (#31822)
Browse files Browse the repository at this point in the history
Co-authored-by: Minh-Anh Phan <[email protected]>
  • Loading branch information
deyaaeldeen and minhanh-phan authored Dec 4, 2024
1 parent 92f232b commit d170eb5
Show file tree
Hide file tree
Showing 82 changed files with 826 additions and 112 deletions.
16 changes: 9 additions & 7 deletions sdk/openai/openai/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

### Features Added

- Adds support for `ungrounded_material` in `ContentFilterResultsForChoiceOutput`.

### Breaking Changes

### Bugs Fixed
Expand All @@ -29,16 +31,16 @@ This release adds types for Azure features supported in Azure OpenAI Service API

### Features Added

- Add support for connecting to MongoDB in Azure On Your Data.
- Add support for citation information in Azure On Your Data responses.
- Add support for content filtering in image generation.
- Adds support for connecting to MongoDB in Azure On Your Data.
- Adds support for citation information in Azure On Your Data responses.
- Adds support for content filtering in image generation.

### Breaking Changes

- Remove the Azure ML connection in Azure On Your Data.
- Remove the enhancements feature from chat completions.
- Remove the now deprecated `finish_details` field in chat completion responses. Use `finish_reason` instead.
- Remove the `role_information` field from the On Your Data request models.
- Removes the Azure ML connection in Azure On Your Data.
- Removes the enhancements feature from chat completions.
- Removes the now deprecated `finish_details` field in chat completion responses. Use `finish_reason` instead.
- Removes the `role_information` field from the On Your Data request models.

## 2.0.0-beta.2 (2024-09-09)

Expand Down
2 changes: 1 addition & 1 deletion sdk/openai/openai/MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Migrated code:
```typescript
import { AzureOpenAI } from "openai";
const deployment = "Your Azure OpenAI deployment";
const apiVersion = "2024-10-21";
const apiVersion = "2024-10-01-preview";
const options = { azureADTokenProvider, deployment, apiVersion }
const client = new AzureOpenAI(options);
```
Expand Down
6 changes: 3 additions & 3 deletions sdk/openai/openai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ There are several ways to authenticate with the Azure OpenAI service and the rec
import { AzureOpenAI } from "openai";
const deployment = "Your deployment name";
const apiVersion = "2024-10-21";
const apiVersion = "2024-10-01-preview";
const client = new AzureOpenAI({ azureADTokenProvider, deployment, apiVersion });
```
Expand Down Expand Up @@ -126,7 +126,7 @@ export async function main() {
const scope = "https://cognitiveservices.azure.com/.default";
const azureADTokenProvider = getBearerTokenProvider(new DefaultAzureCredential(), scope);
const deployment = "gpt-4-1106-preview";
const apiVersion = "2024-10-21";
const apiVersion = "2024-10-01-preview";
const client = new AzureOpenAI({ azureADTokenProvider, deployment, apiVersion });
const events = await client.chat.completions.create({
stream: true,
Expand Down Expand Up @@ -182,7 +182,7 @@ async function main() {
const scope = "https://cognitiveservices.azure.com/.default";
const azureADTokenProvider = getBearerTokenProvider(new DefaultAzureCredential(), scope);
const deployment = "gpt-35-turbo";
const apiVersion = "2024-10-21";
const apiVersion = "2024-10-01-preview";
const client = new AzureOpenAI({ azureADTokenProvider, deployment, apiVersion });
const events = await client.chat.completions.create({
messages: [
Expand Down
Loading

0 comments on commit d170eb5

Please sign in to comment.