- Added support for service API versions,
2024-04-01-previewand2024-05-01-preview. - Note that
AOAIrefers to Azure OpenAI andOAIrefers to OpenAI. - Added timestamp granularity to Whisper transcription; this is an array of enumerated string values
(word and/or segment) that controls which, if any, timestamp information is emitted to transcription results.
AudioTranscriptionTimestampGranularityenum to represent the timestamp granularity options for Whisper transcription.AudioTranscriptionWordclass to represent the word timestamp information in the transcription results.
- Added two new audio formats,
wavandpcm, to theSpeechGenerationResponseFormatenum.
AOAI ONLY
- Added a new RAI content filter schema type,
ContentFilterDetailedResults, that features:- The boolean
filteredproperty fromContentFilterResult. - An array named
detailsof the existingContentFilterBlocklistIdResulttype, each of which has:- The base boolean
filtered - A string
id
- The base boolean
- The boolean
- Added a new property
indirectAttackinContentFilterResultDetailsForPromptclass to represent the indirect attack results. - Added a new property
custom_blocklistsinImageGenerationPromptFilterResultsclass to represent the prompt filter results.
On Your Data
- New string enum type used in options:
OnYourDataContextProperty: "citations" | "intent" | "allRetrievedDocuments"- This is used in arrays like a bitmasked flag; "give me citations and documents" ==
[ "citations", "allRetrievedDocuments" ] - It's not dissimilar to how transcription uses
timestamp_granularities[]
- This is used in arrays like a bitmasked flag; "give me citations and documents" ==
- New model type used in response extensions:
retrievedDocument- Inherits from existing
citation - Required properties:
content(string, inherited),search_queries(array of strings),data_source_index(int32),original_search_score(double) - Optional properties:
title,url,filepath,chunk_id(all strings inherited fromcitation);re_rank_score(double)
- Inherits from existing
- New options fields for chat extension parameters (request options):
max_search_queries(optional int32)allow_partial_result(optional boolean)include_contexts(optional array of the aboveOnYourDataContextPropertyenum (effective flag selection))- Affected
*parameterstypes:AzureSearchChatExtensionParametersAzureMachineLearningIndexChatExtensionParametersAzureCosmosDBChatExtensionParametersElasticsearchChatExtensionParametersPineconeChatExtensionParameters
- Vectorization source types have a new
dimensionsproperty (optional int32)- Affected:
OnYourDataEndpointVectorizationSource,OnYourDataDeploymentNameVectorizationSource
- Affected:
AzureSearchChatExtensionParametersnow supportsOnYourDataAccessTokenAuthenticationOptionsin its namedauthenticationfieldOnYourDataEndpointVectorizationSourcenow supportsOnYourDataAccessTokenAuthenticationOptionsfor its namedauthenticationfield.- Added new class
OnYourDataVectorSearchAuthenticationType,OnYourDataVectorSearchAuthenticationOptions,OnYourDataVectorSearchApiKeyAuthenticationOptions,OnYourDataVectorSearchAccessTokenAuthenticationOptionsfor the vector search authentication options. - The response extension type
AzureChatExtensionsMessageContexthas a newall_retrieved_documentsfield, which is an optional array of the newretrievedDocumenttype defined earlier.
- Replaced Jackson Databind annotations with
azure-jsonfunctionality for OpenAI service models. - [AOAI] Added a new class
ContentFilterDetailedResultsto represent detailed content filter results, which replaces thecustomBlocklistsresponse property type,List<ContentFilterBlocklistIdResult>inContentFilterResultDetailsForPromptandContentFilterResultsForChoiceclass. - [AOAI] Replaced
OnYourDataAuthenticationOptionswithOnYourDataVectorSearchAuthenticationOptionsin theOnYourDataEndpointVectorizationSourceclass. Currently,OnYourDataEndpointVectorizationSourceonly supportsOnYourDataApiKeyAuthenticationOptionsandOnYourDataAccessTokenAuthenticationOptionsas authentication options.
- Added support for service API version,
2024-03-01-preview. - Added a new property to
EmbeddingOptions:dimensions, which is only supported in modelstext-embedding-3-*and above.
- Added a new method to get base64 encoded string in
EmbeddingItemclass:getEmbeddingAsStringmethod returns the embedding as a base64 encoded string.
- Added a new overload
getChatCompletionsStreamWithResponsethat takesRequestOptionsto provide the flexibility to modify the HTTP request.
- Replace return type
List<Double>withList<Float>ofgetEmbeddingmethod inEmbeddingItemclass.
- A bugs fixed in Azure Core SDK that solves where text/event-stream content type wasn't being handled correctly. Replaced content type exact match equal by 'startwith'. (#39204)
- Upgraded
azure-corefrom1.47.0to version1.48.0. - Upgraded
azure-core-http-nettyfrom1.14.1to version1.14.2.
- Text-to-speech using OpenAI TTS models is now supported. See OpenAI's API reference
or the Azure OpenAI quickstart
for detailed overview and background information. The new method
generateSpeechFromTextexposes this capability onOpenAIClientandOpenAIAsyncClient. Text-to-speech converts text into lifelike spoken audio in a chosen voice, together with other optional configurations. This method works for both Azure OpenAI and non-Azureapi.openai.comclient configurations. - Added two new authentication options,
OnYourDataEncodedApiKeyAuthenticationOptionsandOnYourDataAccessTokenAuthenticationOptionsto support the new authentication mechanism for "On Your Data" feature.
- Introduced a new type
AzureChatExtensionDataSourceResponseCitationfor a more structured representation of citation data. - Correspondingly, updated
AzureChatExtensionsMessageContext:- Replaced
messageswithcitationsof typeAzureChatExtensionDataSourceResponseCitation. - Added
intentas a string type.
- Replaced
- Renamed "AzureCognitiveSearch" to "AzureSearch":
AzureCognitiveSearchChatExtensionConfigurationis nowAzureSearchChatExtensionConfiguration.AzureCognitiveSearchIndexFieldMappingOptionsis nowAzureSearchIndexFieldMappingOptions.AzureCognitiveSearchQueryTypeis nowAzureSearchQueryType.
- Replaced
StringpropertynamebyChatCompletionsFunctionToolSelectionpropertyfunctioninChatCompletionsNamedFunctionToolSelection - Made
embeddingDependencyas a required parameter inAzureCosmosDBChatExtensionParametersandPineconeChatExtensionParametersclass, and removed setter method. - Removed
vectorFieldsandimageVectorFieldsfromPineconeFieldMappingOptionsclass, and madecontentFieldas required parameter. - Removed
getAudioTranscriptionAsPlainTextWithResponseandgetAudioTranslationAsPlainTextWithResponsemethods fromOpenAIClientandOpenAIAsyncClientclasses. - Made
ImageGenerationconstructor as private. - Made
ImageGenerationDataconstructor as private and removed setter methods.
- Fixed
ChatRequestUserMessagedeserialization issue. #38183
- Dropped service API version support for
2023-08-01-preview,2023-09-01-previewand2023-12-01-preview. - Made the
getContenta public method inChatRequestUserMessageclass. (#38805) - Added a new property
logprobsinChatChoiceclass to support log probabilities for this chat choice. - Added new properties
logprobsandtopLogprobsinChatCompletionsOptionsclass to support log probabilities for chat completions. - Added a new property
inputTypeinEmbeddingsOptionsclass to support embeddings for different input types when using Azure OpenAI, specifies the input type to use for embedding search. - Added more properties to
AzureCosmosDBFieldMappingOptionsclass to support more field mapping options, includingtitleField,urlField,filepathField,contentFields, andcontentFieldsSeparator. MadecontentFieldas required parameter. - Added new properties
ImageGenerationContentFilterResults contentFilterResultsandImageGenerationPromptFilterResults promptFilterResultsinImageGenerationDataclass to support filtering results. - Added new property
suffixinCompletionsOptionsclass to support suffix for completions.
-1106model feature support forgpt-35-turboandgpt-4-turbo, including use ofseed,system_fingerprint, parallel function calling via tools, "JSON mode" for guaranteed function outputs, and moredall-e-3image generation capabilities viagetImageGenerations, featuring higher model quality, automatic prompt revisions bygpt-4, and customizable quality/style settings- Greatly expanded "On Your Data" capabilities in Azure OpenAI, including many new data source options and authentication mechanisms
- Early support for
gpt-4-vision-preview, which allows the hybrid use of text and images as input to enable scenarios like "describe this image for me" - Support for Azure enhancements to
gpt-4-vision-previewresults that include grounding and OCR features
- Removed methods
getAudioTranscriptionAsResponseObjectandgetAudioTranscriptionAsResponseObjectWithResponsefromOpenAIClientandOpenAIAsyncClientclasses. UsegetAudioTranscriptionorgetAudioTranscriptionWithResponseconvenience methods from respective classes. - Removed methods
getAudioTranslationAsResponseObjectandgetAudioTranslationAsResponseObjectWithResponsefromOpenAIClientandOpenAIAsyncClientclasses. UsegetAudioTranslationorgetAudioTranslationWithResponseconvenience methods from respective classes.
ChatMessage changes:
- The singular
ChatMessagetype has been replaced byChatRequestMessageandChatResponseMessage, the former of which is an abstract, polymorphic type with concrete derivations likeChatRequestSystemMessageandChatRequestUserMessage. This requires conversion from oldChatMessageinto the new types. While this is usually a straightforward string replacement, converting a response message into a request message (e.g. when propagating an assistant response to continue the conversation) will require creating a new instance of the appropriate request message with the response message's data. See the examples for details.
Dall-e-3:
- Azure OpenAI now uses
dall-e-3model deployments for its image generation API and such a valid deployment must be provided into the options for thegetImageGenerations()method to receive results.
- Audio transcription and translation (via
getAudioTranscription()andgetAudioTranslation()now allow specification
of an optionalfileNamein addition to the binary audio data. This is used purely as an identifier and does not functionally alter the transcription/translation behavior in any way.
-
Added support for
Whisperendpoints. -
Translation and Transcription of audio files is available.
-
The above features are available both in Azure and non-Azure OpenAI.
-
Added more convenience methods, which are wrappers around the existing
get{ChatCompletions|Completions|Embeddings}WithResponsemethods with concrete data types instead of usingBinaryDataas the return data type. For example, a new method introduced is- Async:
Mono<Response<ChatCompletions>> getChatCompletionsWithResponse(String deploymentOrModelName, ChatCompletionsOptions chatCompletionsOptions, RequestOptions requestOptions) - Sync:
Response<ChatCompletions> getChatCompletionsWithResponse(String deploymentOrModelName, ChatCompletionsOptions chatCompletionsOptions, RequestOptions requestOptions)
Same methods are added for
CompletionsandEmbeddingsendpoints as well. - Async:
- Replaced usage of class
AzureKeyCredentialbyKeyCredential.
- Upgraded
azure-corefrom1.42.0to version1.43.0. - Upgraded
azure-core-http-nettyfrom1.13.6to version1.13.7.
- Support for BYOD (Bring Your Own Data) was added. Related link
- Replaced usage of class
NonAzureOpenAIKeyCredentialby Azure Core classKeyCredential.
- Upgraded
azure-corefrom1.41.0to version1.42.0. - Upgraded
azure-core-http-nettyfrom1.13.5to version1.13.6.
- Added methods and models to support DALL-E
- Added methods and models to support Functions
- Added models supporting ResponsibleAI annotations
- Fixed garbled characters issue in the returned data of
getChatCompletionsStream.
- Updated
azure-coreto1.41.0. - Updated
azure-core-http-nettyto1.13.5.
- Removed class
ChatMessageDeltaand replaced usage of it byChatMessage.
- PR#35336 fixed
com.fasterxml.jackson.databind.exc.MismatchedInputException: Missing required creator property 'usage' (index 3).
- Updated
azure-coreto1.40.0. - Updated
azure-core-http-nettyto1.13.4.
- Azure OpenAI client library for Java. This package contains Microsoft Azure OpenAI client library. Initial generation from spec
- Support for Non-Azure OpenAI endpoints was introduced, by passing
NonAzureOpenAIKeyCredentialto theOpenAIClientBuilder - Added Streaming support to
CompletionsandChatCompletionsendpoints