Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,9 @@ public Flux<Response<ChatCompletions>> getChatCompletionsStreamWithResponse(Stri
*
* @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name
* (when using non-Azure OpenAI) to use for this request.
* @param body Body parameter.
* @param embeddingsOptions The configuration information for an embeddings request.
* Embeddings measure the relatedness of text strings and are commonly used for search, clustering,
* recommendations, and other similar scenarios.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
Expand All @@ -631,11 +633,11 @@ public Flux<Response<ChatCompletions>> getChatCompletionsStreamWithResponse(Stri
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Embeddings> getEmbeddings(String deploymentOrModelName, EmbeddingsOptions body) {
public Mono<Embeddings> getEmbeddings(String deploymentOrModelName, EmbeddingsOptions embeddingsOptions) {
// Generated convenience method for getEmbeddingsWithResponse
RequestOptions requestOptions = new RequestOptions();
return getEmbeddingsWithResponse(deploymentOrModelName, BinaryData.fromObject(body), requestOptions)
.flatMap(FluxUtil::toMono)
return getEmbeddingsWithResponse(deploymentOrModelName, BinaryData.fromObject(embeddingsOptions),
requestOptions).flatMap(FluxUtil::toMono)
.map(protocolMethodData -> protocolMethodData.toObject(Embeddings.class));
}

Expand All @@ -646,7 +648,9 @@ public Mono<Embeddings> getEmbeddings(String deploymentOrModelName, EmbeddingsOp
*
* @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name
* (when using non-Azure OpenAI) to use for this request.
* @param body Body parameter.
* @param completionsOptions The configuration information for a completions request.
* Completions support a wide variety of tasks and generate text that continues from or "completes"
* provided prompt data.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
Expand All @@ -659,11 +663,11 @@ public Mono<Embeddings> getEmbeddings(String deploymentOrModelName, EmbeddingsOp
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Completions> getCompletions(String deploymentOrModelName, CompletionsOptions body) {
public Mono<Completions> getCompletions(String deploymentOrModelName, CompletionsOptions completionsOptions) {
// Generated convenience method for getCompletionsWithResponse
RequestOptions requestOptions = new RequestOptions();
return getCompletionsWithResponse(deploymentOrModelName, BinaryData.fromObject(body), requestOptions)
.flatMap(FluxUtil::toMono)
return getCompletionsWithResponse(deploymentOrModelName, BinaryData.fromObject(completionsOptions),
requestOptions).flatMap(FluxUtil::toMono)
.map(protocolMethodData -> protocolMethodData.toObject(Completions.class));
}

Expand Down Expand Up @@ -740,7 +744,9 @@ public Flux<Completions> getCompletionsStream(String deploymentOrModelName, Comp
*
* @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name
* (when using non-Azure OpenAI) to use for this request.
* @param body Body parameter.
* @param chatCompletionsOptions The configuration information for a chat completions request.
* Completions support a wide variety of tasks and generate text that continues from or "completes"
* provided prompt data.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
Expand All @@ -753,11 +759,12 @@ public Flux<Completions> getCompletionsStream(String deploymentOrModelName, Comp
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<ChatCompletions> getChatCompletions(String deploymentOrModelName, ChatCompletionsOptions body) {
public Mono<ChatCompletions> getChatCompletions(String deploymentOrModelName,
ChatCompletionsOptions chatCompletionsOptions) {
// Generated convenience method for getChatCompletionsWithResponse
RequestOptions requestOptions = new RequestOptions();
return getChatCompletionsWithResponse(deploymentOrModelName, BinaryData.fromObject(body), requestOptions)
.flatMap(FluxUtil::toMono)
return getChatCompletionsWithResponse(deploymentOrModelName, BinaryData.fromObject(chatCompletionsOptions),
requestOptions).flatMap(FluxUtil::toMono)
.map(protocolMethodData -> protocolMethodData.toObject(ChatCompletions.class));
}

Expand Down Expand Up @@ -830,7 +837,7 @@ public Flux<ChatCompletions> getChatCompletionsStream(String deploymentOrModelNa
*
* @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name
* (when using non-Azure OpenAI) to use for this request.
* @param body Body parameter.
* @param audioTranscriptionOptions The configuration information for an audio transcription request.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
Expand All @@ -842,11 +849,11 @@ public Flux<ChatCompletions> getChatCompletionsStream(String deploymentOrModelNa
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
Mono<Response<BinaryData>> getAudioTranscriptionAsResponseObjectWithResponse(String deploymentOrModelName,
BinaryData body, RequestOptions requestOptions) {
BinaryData audioTranscriptionOptions, RequestOptions requestOptions) {
// Protocol API requires serialization of parts with content-disposition and data, as operation
// 'getAudioTranscriptionAsResponseObject' is 'multipart/form-data'
return this.serviceClient.getAudioTranscriptionAsResponseObjectWithResponseAsync(deploymentOrModelName, body,
requestOptions);
return this.serviceClient.getAudioTranscriptionAsResponseObjectWithResponseAsync(deploymentOrModelName,
audioTranscriptionOptions, requestOptions);
}

/**
Expand Down Expand Up @@ -1143,7 +1150,7 @@ public Mono<Response<String>> getAudioTranslationTextWithResponse(String deploym
*
* @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name
* (when using non-Azure OpenAI) to use for this request.
* @param body Body parameter.
* @param audioTranscriptionOptions The configuration information for an audio transcription request.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
Expand All @@ -1155,11 +1162,11 @@ public Mono<Response<String>> getAudioTranslationTextWithResponse(String deploym
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
Mono<Response<BinaryData>> getAudioTranscriptionAsPlainTextWithResponse(String deploymentOrModelName,
BinaryData body, RequestOptions requestOptions) {
BinaryData audioTranscriptionOptions, RequestOptions requestOptions) {
// Protocol API requires serialization of parts with content-disposition and data, as operation
// 'getAudioTranscriptionAsPlainText' is 'multipart/form-data'
return this.serviceClient.getAudioTranscriptionAsPlainTextWithResponseAsync(deploymentOrModelName, body,
requestOptions);
return this.serviceClient.getAudioTranscriptionAsPlainTextWithResponseAsync(deploymentOrModelName,
audioTranscriptionOptions, requestOptions);
}

/**
Expand Down Expand Up @@ -1193,7 +1200,7 @@ Mono<Response<BinaryData>> getAudioTranscriptionAsPlainTextWithResponse(String d
*
* @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name
* (when using non-Azure OpenAI) to use for this request.
* @param body Body parameter.
* @param audioTranslationOptions The configuration information for an audio translation request.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
Expand All @@ -1205,11 +1212,11 @@ Mono<Response<BinaryData>> getAudioTranscriptionAsPlainTextWithResponse(String d
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
Mono<Response<BinaryData>> getAudioTranslationAsResponseObjectWithResponse(String deploymentOrModelName,
BinaryData body, RequestOptions requestOptions) {
BinaryData audioTranslationOptions, RequestOptions requestOptions) {
// Protocol API requires serialization of parts with content-disposition and data, as operation
// 'getAudioTranslationAsResponseObject' is 'multipart/form-data'
return this.serviceClient.getAudioTranslationAsResponseObjectWithResponseAsync(deploymentOrModelName, body,
requestOptions);
return this.serviceClient.getAudioTranslationAsResponseObjectWithResponseAsync(deploymentOrModelName,
audioTranslationOptions, requestOptions);
}

/**
Expand All @@ -1222,7 +1229,7 @@ Mono<Response<BinaryData>> getAudioTranslationAsResponseObjectWithResponse(Strin
*
* @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name
* (when using non-Azure OpenAI) to use for this request.
* @param body Body parameter.
* @param audioTranslationOptions The configuration information for an audio translation request.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
Expand All @@ -1233,12 +1240,12 @@ Mono<Response<BinaryData>> getAudioTranslationAsResponseObjectWithResponse(Strin
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
Mono<Response<BinaryData>> getAudioTranslationAsPlainTextWithResponse(String deploymentOrModelName, BinaryData body,
RequestOptions requestOptions) {
Mono<Response<BinaryData>> getAudioTranslationAsPlainTextWithResponse(String deploymentOrModelName,
BinaryData audioTranslationOptions, RequestOptions requestOptions) {
// Protocol API requires serialization of parts with content-disposition and data, as operation
// 'getAudioTranslationAsPlainText' is 'multipart/form-data'
return this.serviceClient.getAudioTranslationAsPlainTextWithResponseAsync(deploymentOrModelName, body,
requestOptions);
return this.serviceClient.getAudioTranslationAsPlainTextWithResponseAsync(deploymentOrModelName,
audioTranslationOptions, requestOptions);
}

/**
Expand Down Expand Up @@ -1407,7 +1414,7 @@ public Mono<Response<ImageGenerations>> getImageGenerationsWithResponse(String d
*
* @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name
* (when using non-Azure OpenAI) to use for this request.
* @param body Body parameter.
* @param imageGenerationOptions Represents the request data used to generate images.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
Expand All @@ -1418,11 +1425,12 @@ public Mono<Response<ImageGenerations>> getImageGenerationsWithResponse(String d
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<ImageGenerations> getImageGenerations(String deploymentOrModelName, ImageGenerationOptions body) {
public Mono<ImageGenerations> getImageGenerations(String deploymentOrModelName,
ImageGenerationOptions imageGenerationOptions) {
// Generated convenience method for getImageGenerationsWithResponse
RequestOptions requestOptions = new RequestOptions();
return getImageGenerationsWithResponse(deploymentOrModelName, BinaryData.fromObject(body), requestOptions)
.flatMap(FluxUtil::toMono)
return getImageGenerationsWithResponse(deploymentOrModelName, BinaryData.fromObject(imageGenerationOptions),
requestOptions).flatMap(FluxUtil::toMono)
.map(protocolMethodData -> protocolMethodData.toObject(ImageGenerations.class));
}

Expand Down Expand Up @@ -1521,7 +1529,8 @@ public Mono<Response<BinaryData>> generateSpeechFromTextWithResponse(String depl
*
* @param deploymentOrModelName Specifies either the model deployment name (when using Azure OpenAI) or model name
* (when using non-Azure OpenAI) to use for this request.
* @param body Body parameter.
* @param speechGenerationOptions A representation of the request options that control the behavior of a
* text-to-speech operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
Expand All @@ -1532,10 +1541,11 @@ public Mono<Response<BinaryData>> generateSpeechFromTextWithResponse(String depl
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<BinaryData> generateSpeechFromText(String deploymentOrModelName, SpeechGenerationOptions body) {
public Mono<BinaryData> generateSpeechFromText(String deploymentOrModelName,
SpeechGenerationOptions speechGenerationOptions) {
// Generated convenience method for generateSpeechFromTextWithResponse
RequestOptions requestOptions = new RequestOptions();
return generateSpeechFromTextWithResponse(deploymentOrModelName, BinaryData.fromObject(body), requestOptions)
.flatMap(FluxUtil::toMono);
return generateSpeechFromTextWithResponse(deploymentOrModelName, BinaryData.fromObject(speechGenerationOptions),
requestOptions).flatMap(FluxUtil::toMono);
}
}
Loading