You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[openai] Migrate openai projects to use snippets extraction (#33264)
### Packages impacted by this PR
- @azure/openai
### Issues associated with this PR
- #32416
### Describe the problem that is addressed by this PR
Updates all projects under `openai` to use snippets extraction.
### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?
### Are there test cases added in this PR? _(If not, why?)_
### Provide a list of related PRs _(if any)_
### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_
### Checklists
- [ ] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
Copy file name to clipboardexpand all lines: sdk/openai/openai/CHANGELOG.md
+14-11
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,5 @@
1
+
<!-- dev-tool snippets ignore -->
2
+
1
3
# Release History
2
4
3
5
## 2.1.0-beta.1 (Unreleased)
@@ -71,17 +73,18 @@ This release adds types for Azure features supported in Azure OpenAI Service API
71
73
- Adds a new property `logprobs` in `ChatChoice` to support log probabilities for this chat choice
72
74
- Adds new properties `logprobs` and `topLogprobs` in `ChatCompletionsOptions` class to support log probabilities for chat completions
73
75
- Adds `dimensions` in `GetEmbeddingsOptions`.
74
-
when using Azure OpenAI, specifies the input type to use for embedding search.
76
+
when using Azure OpenAI, specifies the input type to use for embedding search.
75
77
- Updates the default service API version to `2024-03-01-preview`
76
78
- Returns content filter results and prompt filter results for image generations through `contentFilterResults` and `promptFilterResults` properties
77
79
78
80
### Breaking Changes
79
81
80
82
-`AzureChatExtensionConfiguration`, `OnYourDataAuthenticationOptions`, `OnYourDataVectorizationSource`, `OnYourDataVectorizationSourceType`, `ChatCompletionsNamedToolSelection`, `ChatCompletionsToolDefinition`, `ChatCompletionsToolCall`, `ChatMessageContentItem`, `ChatRequestMessage`, `ChatFinishDetails` are renamed with `Union` postfix.
81
-
-`AzureCognitiveSearchQueryType`, `ChatMessageImageDetailLevel`, `ElasticsearchQueryType`, `FunctionCallPreset`, `ImageGenerationQuality`, `ImageGenerationResponseFormat`, `ImageSize`, `ImageGenerationStyle`, `OnYourDataAuthenticationType`, `OnYourDataVectorizationSourceType`union types no longer have fixed values.
83
+
-`AzureCognitiveSearchQueryType`, `ChatMessageImageDetailLevel`, `ElasticsearchQueryType`, `FunctionCallPreset`, `ImageGenerationQuality`, `ImageGenerationResponseFormat`, `ImageSize`, `ImageGenerationStyle`, `OnYourDataAuthenticationType`, `OnYourDataVectorizationSourceType` union types no longer have fixed values.
82
84
-`prompFilterResults` property in `ChatCompletions`, `prompFilterResults` property in `Choice`, `toolCalls` in `ChatResponseMessage` are now optional
83
85
84
86
Changes to "bring your own data" features:
87
+
85
88
- Introduces a new type: `AzureChatExtensionDataSourceResponseCitation`
86
89
- For `AzureChatExtensionsMessageContext`, replaced `messages` property with `citations` and added `intent` as a string
87
90
- Rename `AzureCognitiveSearch` to `AzureSearch`
@@ -118,10 +121,10 @@ Changes to "bring your own data" features:
118
121
-`listChatCompletions` and `listCompletions` are renamed to `streamChatCompletions` and `streamCompletions` respectively and their return types are updated to be a `ReadableStream`. For example, `streamChatCompletions` can be used as follows:
@@ -142,18 +145,18 @@ features and changes to the client library.
142
145
`ChatMessage` changes:
143
146
144
147
- The singular `ChatMessage` type has been replaced by `ChatRequestMessage` and `ChatResponseMessage`, the former of
145
-
which is a union of special message structures such as `ChatRequestSystemMessage` and
146
-
`ChatRequestUserMessage`.
148
+
which is a union of special message structures such as `ChatRequestSystemMessage` and
149
+
`ChatRequestUserMessage`.
147
150
148
151
Dall-e-3:
149
152
150
153
- Azure OpenAI now uses `dall-e-3` model deployments for its image generation API and such a valid deployment must
151
-
be provided to the `GetImageGenerations` method.
154
+
be provided to the `GetImageGenerations` method.
152
155
153
156
On Your Data:
154
157
155
158
- The `AzureExtensionChatConfiguration` type has been updated to inline the parameters of the extension into the
156
-
configuration object itself.
159
+
configuration object itself.
157
160
158
161
## 1.0.0-beta.7 (2023-10-25)
159
162
@@ -194,7 +197,7 @@ On Your Data:
194
197
195
198
### Breaking Changes
196
199
197
-
- Remove `beginAzureBatchImageGeneration` and `getAzureBatchImageGenerationOperationStatus` methods.
200
+
- Remove `beginAzureBatchImageGeneration` and `getAzureBatchImageGenerationOperationStatus` methods.
198
201
-`getImages` has been updated to return the image URLs/payloads directly, rather than requiring the user to call `getAzureBatchImageGenerationOperationStatus` to retrieve them.
Copy file name to clipboardexpand all lines: sdk/openai/openai/MIGRATION.md
+40-35
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,5 @@
1
+
<!-- dev-tool snippets ignore -->
2
+
1
3
# Migrating to `openai`
2
4
3
5
**Note ⚠️**: This document is a work-in-progress and may change to reflect updates to the package. We value your feedback, please [create an issue](https://github.com/Azure/azure-sdk-for-js/issues/new/choose) to suggest any improvements or report any problems with this guide or with the package itself.
0 commit comments