From 0dbc5f213fcbaef71c5acb18d6488a2b37f9c265 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 26 Jun 2024 19:32:23 +0000 Subject: [PATCH] CodeGen from PR 29483 in Azure/azure-rest-api-specs Merge b0eecac9660020b988983448b6a8ff9fbc2e47ff into 2b6c728b10f0d8eca8bad4e7f009e38334ea7f1c --- .../azure/ai/openai/OpenAIAsyncClient.java | 63 ++++---- .../com/azure/ai/openai/OpenAIClient.java | 68 ++++---- .../implementation/OpenAIClientImpl.java | 153 ++++++++---------- sdk/openai/azure-ai-openai/tsp-location.yaml | 5 +- 4 files changed, 130 insertions(+), 159 deletions(-) diff --git a/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIAsyncClient.java b/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIAsyncClient.java index 46014baa89309..2c2c339d7a550 100644 --- a/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIAsyncClient.java +++ b/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIAsyncClient.java @@ -618,9 +618,7 @@ public Flux> 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 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. + * @param body Body parameter. * @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. @@ -633,11 +631,11 @@ public Flux> getChatCompletionsStreamWithResponse(Stri */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getEmbeddings(String deploymentOrModelName, EmbeddingsOptions embeddingsOptions) { + public Mono getEmbeddings(String deploymentOrModelName, EmbeddingsOptions body) { // Generated convenience method for getEmbeddingsWithResponse RequestOptions requestOptions = new RequestOptions(); - return getEmbeddingsWithResponse(deploymentOrModelName, BinaryData.fromObject(embeddingsOptions), - requestOptions).flatMap(FluxUtil::toMono) + return getEmbeddingsWithResponse(deploymentOrModelName, BinaryData.fromObject(body), requestOptions) + .flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(Embeddings.class)); } @@ -648,9 +646,7 @@ public Mono 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 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. + * @param body Body parameter. * @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. @@ -663,11 +659,11 @@ public Mono getEmbeddings(String deploymentOrModelName, EmbeddingsOp */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getCompletions(String deploymentOrModelName, CompletionsOptions completionsOptions) { + public Mono getCompletions(String deploymentOrModelName, CompletionsOptions body) { // Generated convenience method for getCompletionsWithResponse RequestOptions requestOptions = new RequestOptions(); - return getCompletionsWithResponse(deploymentOrModelName, BinaryData.fromObject(completionsOptions), - requestOptions).flatMap(FluxUtil::toMono) + return getCompletionsWithResponse(deploymentOrModelName, BinaryData.fromObject(body), requestOptions) + .flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(Completions.class)); } @@ -837,7 +833,7 @@ public Flux 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 audioTranscriptionOptions The configuration information for an audio transcription request. + * @param body Body parameter. * @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. @@ -849,11 +845,11 @@ public Flux getChatCompletionsStream(String deploymentOrModelNa @Generated @ServiceMethod(returns = ReturnType.SINGLE) Mono> getAudioTranscriptionAsResponseObjectWithResponse(String deploymentOrModelName, - BinaryData audioTranscriptionOptions, RequestOptions requestOptions) { + BinaryData body, 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, - audioTranscriptionOptions, requestOptions); + return this.serviceClient.getAudioTranscriptionAsResponseObjectWithResponseAsync(deploymentOrModelName, body, + requestOptions); } /** @@ -1150,7 +1146,7 @@ public Mono> 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 audioTranscriptionOptions The configuration information for an audio transcription request. + * @param body Body parameter. * @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. @@ -1162,11 +1158,11 @@ public Mono> getAudioTranslationTextWithResponse(String deploym @Generated @ServiceMethod(returns = ReturnType.SINGLE) Mono> getAudioTranscriptionAsPlainTextWithResponse(String deploymentOrModelName, - BinaryData audioTranscriptionOptions, RequestOptions requestOptions) { + BinaryData body, 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, - audioTranscriptionOptions, requestOptions); + return this.serviceClient.getAudioTranscriptionAsPlainTextWithResponseAsync(deploymentOrModelName, body, + requestOptions); } /** @@ -1200,7 +1196,7 @@ Mono> 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 audioTranslationOptions The configuration information for an audio translation request. + * @param body Body parameter. * @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. @@ -1212,11 +1208,11 @@ Mono> getAudioTranscriptionAsPlainTextWithResponse(String d @Generated @ServiceMethod(returns = ReturnType.SINGLE) Mono> getAudioTranslationAsResponseObjectWithResponse(String deploymentOrModelName, - BinaryData audioTranslationOptions, RequestOptions requestOptions) { + BinaryData body, 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, - audioTranslationOptions, requestOptions); + return this.serviceClient.getAudioTranslationAsResponseObjectWithResponseAsync(deploymentOrModelName, body, + requestOptions); } /** @@ -1229,7 +1225,7 @@ Mono> 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 audioTranslationOptions The configuration information for an audio translation request. + * @param body Body parameter. * @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. @@ -1240,12 +1236,12 @@ Mono> getAudioTranslationAsResponseObjectWithResponse(Strin */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getAudioTranslationAsPlainTextWithResponse(String deploymentOrModelName, - BinaryData audioTranslationOptions, RequestOptions requestOptions) { + Mono> getAudioTranslationAsPlainTextWithResponse(String deploymentOrModelName, BinaryData body, + 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, - audioTranslationOptions, requestOptions); + return this.serviceClient.getAudioTranslationAsPlainTextWithResponseAsync(deploymentOrModelName, body, + requestOptions); } /** @@ -1381,7 +1377,7 @@ Mono> getImageGenerationsWithResponse(String deployme * * @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 imageGenerationOptions Represents the request data used to generate images. + * @param body Body parameter. * @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. @@ -1392,12 +1388,11 @@ Mono> getImageGenerationsWithResponse(String deployme */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getImageGenerations(String deploymentOrModelName, - ImageGenerationOptions imageGenerationOptions) { + public Mono getImageGenerations(String deploymentOrModelName, ImageGenerationOptions body) { // Generated convenience method for getImageGenerationsWithResponse RequestOptions requestOptions = new RequestOptions(); - return getImageGenerationsWithResponse(deploymentOrModelName, BinaryData.fromObject(imageGenerationOptions), - requestOptions).flatMap(FluxUtil::toMono) + return getImageGenerationsWithResponse(deploymentOrModelName, BinaryData.fromObject(body), requestOptions) + .flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(ImageGenerations.class)); } diff --git a/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIClient.java b/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIClient.java index 51a1b43a67cb7..9f2c94dbbd313 100644 --- a/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIClient.java +++ b/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/OpenAIClient.java @@ -550,9 +550,7 @@ public Response getChatCompletionsWithResponse(String deploymen * * @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 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. + * @param body Body parameter. * @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. @@ -565,11 +563,11 @@ public Response getChatCompletionsWithResponse(String deploymen */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Embeddings getEmbeddings(String deploymentOrModelName, EmbeddingsOptions embeddingsOptions) { + public Embeddings getEmbeddings(String deploymentOrModelName, EmbeddingsOptions body) { // Generated convenience method for getEmbeddingsWithResponse RequestOptions requestOptions = new RequestOptions(); - return getEmbeddingsWithResponse(deploymentOrModelName, BinaryData.fromObject(embeddingsOptions), - requestOptions).getValue().toObject(Embeddings.class); + return getEmbeddingsWithResponse(deploymentOrModelName, BinaryData.fromObject(body), requestOptions).getValue() + .toObject(Embeddings.class); } /** @@ -579,9 +577,7 @@ public Embeddings getEmbeddings(String deploymentOrModelName, EmbeddingsOptions * * @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 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. + * @param body Body parameter. * @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. @@ -594,11 +590,11 @@ public Embeddings getEmbeddings(String deploymentOrModelName, EmbeddingsOptions */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Completions getCompletions(String deploymentOrModelName, CompletionsOptions completionsOptions) { + public Completions getCompletions(String deploymentOrModelName, CompletionsOptions body) { // Generated convenience method for getCompletionsWithResponse RequestOptions requestOptions = new RequestOptions(); - return getCompletionsWithResponse(deploymentOrModelName, BinaryData.fromObject(completionsOptions), - requestOptions).getValue().toObject(Completions.class); + return getCompletionsWithResponse(deploymentOrModelName, BinaryData.fromObject(body), requestOptions).getValue() + .toObject(Completions.class); } /** @@ -1091,7 +1087,7 @@ public Response getAudioTranslationTextWithResponse(String deploymentOrM * * @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 audioTranscriptionOptions The configuration information for an audio transcription request. + * @param body Body parameter. * @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. @@ -1102,11 +1098,11 @@ public Response getAudioTranslationTextWithResponse(String deploymentOrM @Generated @ServiceMethod(returns = ReturnType.SINGLE) Response getAudioTranscriptionAsResponseObjectWithResponse(String deploymentOrModelName, - BinaryData audioTranscriptionOptions, RequestOptions requestOptions) { + BinaryData body, RequestOptions requestOptions) { // Protocol API requires serialization of parts with content-disposition and data, as operation // 'getAudioTranscriptionAsResponseObject' is 'multipart/form-data' - return this.serviceClient.getAudioTranscriptionAsResponseObjectWithResponse(deploymentOrModelName, - audioTranscriptionOptions, requestOptions); + return this.serviceClient.getAudioTranscriptionAsResponseObjectWithResponse(deploymentOrModelName, body, + requestOptions); } /** @@ -1120,7 +1116,7 @@ Response getAudioTranscriptionAsResponseObjectWithResponse(String de * * @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 audioTranscriptionOptions The configuration information for an audio transcription request. + * @param body Body parameter. * @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. @@ -1130,12 +1126,12 @@ Response getAudioTranscriptionAsResponseObjectWithResponse(String de */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response getAudioTranscriptionAsPlainTextWithResponse(String deploymentOrModelName, - BinaryData audioTranscriptionOptions, RequestOptions requestOptions) { + Response getAudioTranscriptionAsPlainTextWithResponse(String deploymentOrModelName, BinaryData body, + RequestOptions requestOptions) { // Protocol API requires serialization of parts with content-disposition and data, as operation // 'getAudioTranscriptionAsPlainText' is 'multipart/form-data' - return this.serviceClient.getAudioTranscriptionAsPlainTextWithResponse(deploymentOrModelName, - audioTranscriptionOptions, requestOptions); + return this.serviceClient.getAudioTranscriptionAsPlainTextWithResponse(deploymentOrModelName, body, + requestOptions); } /** @@ -1169,7 +1165,7 @@ Response getAudioTranscriptionAsPlainTextWithResponse(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 audioTranslationOptions The configuration information for an audio translation request. + * @param body Body parameter. * @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. @@ -1180,12 +1176,12 @@ Response getAudioTranscriptionAsPlainTextWithResponse(String deploym */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response getAudioTranslationAsResponseObjectWithResponse(String deploymentOrModelName, - BinaryData audioTranslationOptions, RequestOptions requestOptions) { + Response getAudioTranslationAsResponseObjectWithResponse(String deploymentOrModelName, BinaryData body, + RequestOptions requestOptions) { // Protocol API requires serialization of parts with content-disposition and data, as operation // 'getAudioTranslationAsResponseObject' is 'multipart/form-data' - return this.serviceClient.getAudioTranslationAsResponseObjectWithResponse(deploymentOrModelName, - audioTranslationOptions, requestOptions); + return this.serviceClient.getAudioTranslationAsResponseObjectWithResponse(deploymentOrModelName, body, + requestOptions); } /** @@ -1198,7 +1194,7 @@ Response getAudioTranslationAsResponseObjectWithResponse(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 audioTranslationOptions The configuration information for an audio translation request. + * @param body Body parameter. * @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. @@ -1209,12 +1205,12 @@ Response getAudioTranslationAsResponseObjectWithResponse(String depl */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response getAudioTranslationAsPlainTextWithResponse(String deploymentOrModelName, - BinaryData audioTranslationOptions, RequestOptions requestOptions) { + Response getAudioTranslationAsPlainTextWithResponse(String deploymentOrModelName, BinaryData body, + RequestOptions requestOptions) { // Protocol API requires serialization of parts with content-disposition and data, as operation // 'getAudioTranslationAsPlainText' is 'multipart/form-data' - return this.serviceClient.getAudioTranslationAsPlainTextWithResponse(deploymentOrModelName, - audioTranslationOptions, requestOptions); + return this.serviceClient.getAudioTranslationAsPlainTextWithResponse(deploymentOrModelName, body, + requestOptions); } /** @@ -1344,7 +1340,7 @@ Response getImageGenerationsWithResponse(String deploymentOrMo * * @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 imageGenerationOptions Represents the request data used to generate images. + * @param body Body parameter. * @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. @@ -1355,12 +1351,12 @@ Response getImageGenerationsWithResponse(String deploymentOrMo */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public ImageGenerations getImageGenerations(String deploymentOrModelName, - ImageGenerationOptions imageGenerationOptions) { + public ImageGenerations getImageGenerations(String deploymentOrModelName, ImageGenerationOptions body) { // Generated convenience method for getImageGenerationsWithResponse RequestOptions requestOptions = new RequestOptions(); - return getImageGenerationsWithResponse(deploymentOrModelName, BinaryData.fromObject(imageGenerationOptions), - requestOptions).getValue().toObject(ImageGenerations.class); + return getImageGenerationsWithResponse(deploymentOrModelName, BinaryData.fromObject(body), requestOptions) + .getValue() + .toObject(ImageGenerations.class); } /** diff --git a/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/implementation/OpenAIClientImpl.java b/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/implementation/OpenAIClientImpl.java index c6de4304f762f..75855a8624652 100644 --- a/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/implementation/OpenAIClientImpl.java +++ b/sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/implementation/OpenAIClientImpl.java @@ -160,8 +160,7 @@ public interface OpenAIClientService { Mono> getAudioTranscriptionAsPlainText(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("deploymentId") String deploymentOrModelName, @HeaderParam("Content-Type") String contentType, @HeaderParam("accept") String accept, - @BodyParam("multipart/form-data") BinaryData audioTranscriptionOptions, RequestOptions requestOptions, - Context context); + @BodyParam("multipart/form-data") BinaryData body, RequestOptions requestOptions, Context context); // @Multipart not supported by RestProxy @Post("/deployments/{deploymentId}/audio/transcriptions") @@ -173,8 +172,7 @@ Mono> getAudioTranscriptionAsPlainText(@HostParam("endpoint Response getAudioTranscriptionAsPlainTextSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("deploymentId") String deploymentOrModelName, @HeaderParam("Content-Type") String contentType, @HeaderParam("accept") String accept, - @BodyParam("multipart/form-data") BinaryData audioTranscriptionOptions, RequestOptions requestOptions, - Context context); + @BodyParam("multipart/form-data") BinaryData body, RequestOptions requestOptions, Context context); // @Multipart not supported by RestProxy @Post("/deployments/{deploymentId}/audio/transcriptions") @@ -186,8 +184,7 @@ Response getAudioTranscriptionAsPlainTextSync(@HostParam("endpoint") Mono> getAudioTranscriptionAsResponseObject(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("deploymentId") String deploymentOrModelName, @HeaderParam("Content-Type") String contentType, @HeaderParam("accept") String accept, - @BodyParam("multipart/form-data") BinaryData audioTranscriptionOptions, RequestOptions requestOptions, - Context context); + @BodyParam("multipart/form-data") BinaryData body, RequestOptions requestOptions, Context context); // @Multipart not supported by RestProxy @Post("/deployments/{deploymentId}/audio/transcriptions") @@ -199,8 +196,7 @@ Mono> getAudioTranscriptionAsResponseObject(@HostParam("end Response getAudioTranscriptionAsResponseObjectSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("deploymentId") String deploymentOrModelName, @HeaderParam("Content-Type") String contentType, @HeaderParam("accept") String accept, - @BodyParam("multipart/form-data") BinaryData audioTranscriptionOptions, RequestOptions requestOptions, - Context context); + @BodyParam("multipart/form-data") BinaryData body, RequestOptions requestOptions, Context context); // @Multipart not supported by RestProxy @Post("/deployments/{deploymentId}/audio/translations") @@ -212,8 +208,7 @@ Response getAudioTranscriptionAsResponseObjectSync(@HostParam("endpo Mono> getAudioTranslationAsPlainText(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("deploymentId") String deploymentOrModelName, @HeaderParam("Content-Type") String contentType, @HeaderParam("accept") String accept, - @BodyParam("multipart/form-data") BinaryData audioTranslationOptions, RequestOptions requestOptions, - Context context); + @BodyParam("multipart/form-data") BinaryData body, RequestOptions requestOptions, Context context); // @Multipart not supported by RestProxy @Post("/deployments/{deploymentId}/audio/translations") @@ -225,8 +220,7 @@ Mono> getAudioTranslationAsPlainText(@HostParam("endpoint") Response getAudioTranslationAsPlainTextSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("deploymentId") String deploymentOrModelName, @HeaderParam("Content-Type") String contentType, @HeaderParam("accept") String accept, - @BodyParam("multipart/form-data") BinaryData audioTranslationOptions, RequestOptions requestOptions, - Context context); + @BodyParam("multipart/form-data") BinaryData body, RequestOptions requestOptions, Context context); // @Multipart not supported by RestProxy @Post("/deployments/{deploymentId}/audio/translations") @@ -238,8 +232,7 @@ Response getAudioTranslationAsPlainTextSync(@HostParam("endpoint") S Mono> getAudioTranslationAsResponseObject(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("deploymentId") String deploymentOrModelName, @HeaderParam("Content-Type") String contentType, @HeaderParam("accept") String accept, - @BodyParam("multipart/form-data") BinaryData audioTranslationOptions, RequestOptions requestOptions, - Context context); + @BodyParam("multipart/form-data") BinaryData body, RequestOptions requestOptions, Context context); // @Multipart not supported by RestProxy @Post("/deployments/{deploymentId}/audio/translations") @@ -251,8 +244,7 @@ Mono> getAudioTranslationAsResponseObject(@HostParam("endpo Response getAudioTranslationAsResponseObjectSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("deploymentId") String deploymentOrModelName, @HeaderParam("Content-Type") String contentType, @HeaderParam("accept") String accept, - @BodyParam("multipart/form-data") BinaryData audioTranslationOptions, RequestOptions requestOptions, - Context context); + @BodyParam("multipart/form-data") BinaryData body, RequestOptions requestOptions, Context context); @Post("/deployments/{deploymentId}/completions") @ExpectedResponses({ 200 }) @@ -262,7 +254,7 @@ Response getAudioTranslationAsResponseObjectSync(@HostParam("endpoin @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> getCompletions(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("deploymentId") String deploymentOrModelName, - @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData completionsOptions, + @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @Post("/deployments/{deploymentId}/completions") @@ -273,7 +265,7 @@ Mono> getCompletions(@HostParam("endpoint") String endpoint @UnexpectedResponseExceptionType(HttpResponseException.class) Response getCompletionsSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("deploymentId") String deploymentOrModelName, - @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData completionsOptions, + @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @Post("/deployments/{deploymentId}/chat/completions") @@ -306,7 +298,7 @@ Response getChatCompletionsSync(@HostParam("endpoint") String endpoi @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> getImageGenerations(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("deploymentId") String deploymentOrModelName, - @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData imageGenerationOptions, + @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @Post("/deployments/{deploymentId}/images/generations") @@ -317,7 +309,7 @@ Mono> getImageGenerations(@HostParam("endpoint") String end @UnexpectedResponseExceptionType(HttpResponseException.class) Response getImageGenerationsSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("deploymentId") String deploymentOrModelName, - @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData imageGenerationOptions, + @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @Post("/deployments/{deploymentId}/audio/speech") @@ -350,7 +342,7 @@ Response generateSpeechFromTextSync(@HostParam("endpoint") String en @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> getEmbeddings(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("deploymentId") String deploymentOrModelName, - @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData embeddingsOptions, + @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); @Post("/deployments/{deploymentId}/embeddings") @@ -361,7 +353,7 @@ Mono> getEmbeddings(@HostParam("endpoint") String endpoint, @UnexpectedResponseExceptionType(HttpResponseException.class) Response getEmbeddingsSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("deploymentId") String deploymentOrModelName, - @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData embeddingsOptions, + @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); } @@ -376,7 +368,7 @@ Response getEmbeddingsSync(@HostParam("endpoint") String endpoint, * * @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 audioTranscriptionOptions The configuration information for an audio transcription request. + * @param body Body parameter. * @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. @@ -387,12 +379,12 @@ Response getEmbeddingsSync(@HostParam("endpoint") String endpoint, */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getAudioTranscriptionAsPlainTextWithResponseAsync(String deploymentOrModelName, - BinaryData audioTranscriptionOptions, RequestOptions requestOptions) { + BinaryData body, RequestOptions requestOptions) { final String contentType = "multipart/form-data"; final String accept = "text/plain, application/json"; return FluxUtil.withContext(context -> service.getAudioTranscriptionAsPlainText(this.getEndpoint(), - this.getServiceVersion().getVersion(), deploymentOrModelName, contentType, accept, - audioTranscriptionOptions, requestOptions, context)); + this.getServiceVersion().getVersion(), deploymentOrModelName, contentType, accept, body, requestOptions, + context)); } /** @@ -406,7 +398,7 @@ public Mono> getAudioTranscriptionAsPlainTextWithResponseAs * * @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 audioTranscriptionOptions The configuration information for an audio transcription request. + * @param body Body parameter. * @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. @@ -416,11 +408,11 @@ public Mono> getAudioTranscriptionAsPlainTextWithResponseAs */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getAudioTranscriptionAsPlainTextWithResponse(String deploymentOrModelName, - BinaryData audioTranscriptionOptions, RequestOptions requestOptions) { + BinaryData body, RequestOptions requestOptions) { final String contentType = "multipart/form-data"; final String accept = "text/plain, application/json"; return service.getAudioTranscriptionAsPlainTextSync(this.getEndpoint(), this.getServiceVersion().getVersion(), - deploymentOrModelName, contentType, accept, audioTranscriptionOptions, requestOptions, Context.NONE); + deploymentOrModelName, contentType, accept, body, requestOptions, Context.NONE); } /** @@ -462,7 +454,7 @@ public Response getAudioTranscriptionAsPlainTextWithResponse(String * * @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 audioTranscriptionOptions The configuration information for an audio transcription request. + * @param body Body parameter. * @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. @@ -473,12 +465,12 @@ public Response getAudioTranscriptionAsPlainTextWithResponse(String */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getAudioTranscriptionAsResponseObjectWithResponseAsync( - String deploymentOrModelName, BinaryData audioTranscriptionOptions, RequestOptions requestOptions) { + String deploymentOrModelName, BinaryData body, RequestOptions requestOptions) { final String contentType = "multipart/form-data"; final String accept = "application/json"; return FluxUtil.withContext(context -> service.getAudioTranscriptionAsResponseObject(this.getEndpoint(), - this.getServiceVersion().getVersion(), deploymentOrModelName, contentType, accept, - audioTranscriptionOptions, requestOptions, context)); + this.getServiceVersion().getVersion(), deploymentOrModelName, contentType, accept, body, requestOptions, + context)); } /** @@ -520,7 +512,7 @@ public Mono> getAudioTranscriptionAsResponseObjectWithRespo * * @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 audioTranscriptionOptions The configuration information for an audio transcription request. + * @param body Body parameter. * @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. @@ -530,12 +522,12 @@ public Mono> getAudioTranscriptionAsResponseObjectWithRespo */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getAudioTranscriptionAsResponseObjectWithResponse(String deploymentOrModelName, - BinaryData audioTranscriptionOptions, RequestOptions requestOptions) { + BinaryData body, RequestOptions requestOptions) { final String contentType = "multipart/form-data"; final String accept = "application/json"; return service.getAudioTranscriptionAsResponseObjectSync(this.getEndpoint(), - this.getServiceVersion().getVersion(), deploymentOrModelName, contentType, accept, - audioTranscriptionOptions, requestOptions, Context.NONE); + this.getServiceVersion().getVersion(), deploymentOrModelName, contentType, accept, body, requestOptions, + Context.NONE); } /** @@ -548,7 +540,7 @@ public Response getAudioTranscriptionAsResponseObjectWithResponse(St * * @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 audioTranslationOptions The configuration information for an audio translation request. + * @param body Body parameter. * @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. @@ -559,12 +551,12 @@ public Response getAudioTranscriptionAsResponseObjectWithResponse(St */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getAudioTranslationAsPlainTextWithResponseAsync(String deploymentOrModelName, - BinaryData audioTranslationOptions, RequestOptions requestOptions) { + BinaryData body, RequestOptions requestOptions) { final String contentType = "multipart/form-data"; final String accept = "text/plain, application/json"; return FluxUtil.withContext( context -> service.getAudioTranslationAsPlainText(this.getEndpoint(), this.getServiceVersion().getVersion(), - deploymentOrModelName, contentType, accept, audioTranslationOptions, requestOptions, context)); + deploymentOrModelName, contentType, accept, body, requestOptions, context)); } /** @@ -577,7 +569,7 @@ public Mono> getAudioTranslationAsPlainTextWithResponseAsyn * * @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 audioTranslationOptions The configuration information for an audio translation request. + * @param body Body parameter. * @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. @@ -588,11 +580,11 @@ public Mono> getAudioTranslationAsPlainTextWithResponseAsyn */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getAudioTranslationAsPlainTextWithResponse(String deploymentOrModelName, - BinaryData audioTranslationOptions, RequestOptions requestOptions) { + BinaryData body, RequestOptions requestOptions) { final String contentType = "multipart/form-data"; final String accept = "text/plain, application/json"; return service.getAudioTranslationAsPlainTextSync(this.getEndpoint(), this.getServiceVersion().getVersion(), - deploymentOrModelName, contentType, accept, audioTranslationOptions, requestOptions, Context.NONE); + deploymentOrModelName, contentType, accept, body, requestOptions, Context.NONE); } /** @@ -626,7 +618,7 @@ public Response getAudioTranslationAsPlainTextWithResponse(String de * * @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 audioTranslationOptions The configuration information for an audio translation request. + * @param body Body parameter. * @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. @@ -637,12 +629,12 @@ public Response getAudioTranslationAsPlainTextWithResponse(String de */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getAudioTranslationAsResponseObjectWithResponseAsync(String deploymentOrModelName, - BinaryData audioTranslationOptions, RequestOptions requestOptions) { + BinaryData body, RequestOptions requestOptions) { final String contentType = "multipart/form-data"; final String accept = "application/json"; return FluxUtil.withContext(context -> service.getAudioTranslationAsResponseObject(this.getEndpoint(), - this.getServiceVersion().getVersion(), deploymentOrModelName, contentType, accept, audioTranslationOptions, - requestOptions, context)); + this.getServiceVersion().getVersion(), deploymentOrModelName, contentType, accept, body, requestOptions, + context)); } /** @@ -676,7 +668,7 @@ public Mono> getAudioTranslationAsResponseObjectWithRespons * * @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 audioTranslationOptions The configuration information for an audio translation request. + * @param body Body parameter. * @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. @@ -687,12 +679,12 @@ public Mono> getAudioTranslationAsResponseObjectWithRespons */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getAudioTranslationAsResponseObjectWithResponse(String deploymentOrModelName, - BinaryData audioTranslationOptions, RequestOptions requestOptions) { + BinaryData body, RequestOptions requestOptions) { final String contentType = "multipart/form-data"; final String accept = "application/json"; return service.getAudioTranslationAsResponseObjectSync(this.getEndpoint(), - this.getServiceVersion().getVersion(), deploymentOrModelName, contentType, accept, audioTranslationOptions, - requestOptions, Context.NONE); + this.getServiceVersion().getVersion(), deploymentOrModelName, contentType, accept, body, requestOptions, + Context.NONE); } /** @@ -824,9 +816,7 @@ public Response getAudioTranslationAsResponseObjectWithResponse(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 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. + * @param body Body parameter. * @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. @@ -837,12 +827,11 @@ public Response getAudioTranslationAsResponseObjectWithResponse(Stri * provided prompt data along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getCompletionsWithResponseAsync(String deploymentOrModelName, - BinaryData completionsOptions, RequestOptions requestOptions) { + public Mono> getCompletionsWithResponseAsync(String deploymentOrModelName, BinaryData body, + RequestOptions requestOptions) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getCompletions(this.getEndpoint(), this.getServiceVersion().getVersion(), - deploymentOrModelName, accept, completionsOptions, requestOptions, context)); + return FluxUtil.withContext(context -> service.getCompletions(this.getEndpoint(), + this.getServiceVersion().getVersion(), deploymentOrModelName, accept, body, requestOptions, context)); } /** @@ -974,9 +963,7 @@ public Mono> getCompletionsWithResponseAsync(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 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. + * @param body Body parameter. * @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. @@ -987,11 +974,11 @@ public Mono> getCompletionsWithResponseAsync(String deploym * provided prompt data along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getCompletionsWithResponse(String deploymentOrModelName, BinaryData completionsOptions, + public Response getCompletionsWithResponse(String deploymentOrModelName, BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; return service.getCompletionsSync(this.getEndpoint(), this.getServiceVersion().getVersion(), - deploymentOrModelName, accept, completionsOptions, requestOptions, Context.NONE); + deploymentOrModelName, accept, body, requestOptions, Context.NONE); } /** @@ -1564,7 +1551,7 @@ public Response getChatCompletionsWithResponse(String deploymentOrMo * * @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 imageGenerationOptions Represents the request data used to generate images. + * @param body Body parameter. * @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. @@ -1575,11 +1562,10 @@ public Response getChatCompletionsWithResponse(String deploymentOrMo */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getImageGenerationsWithResponseAsync(String deploymentOrModelName, - BinaryData imageGenerationOptions, RequestOptions requestOptions) { + BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.getImageGenerations(this.getEndpoint(), this.getServiceVersion().getVersion(), - deploymentOrModelName, accept, imageGenerationOptions, requestOptions, context)); + return FluxUtil.withContext(context -> service.getImageGenerations(this.getEndpoint(), + this.getServiceVersion().getVersion(), deploymentOrModelName, accept, body, requestOptions, context)); } /** @@ -1645,7 +1631,7 @@ public Mono> getImageGenerationsWithResponseAsync(String de * * @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 imageGenerationOptions Represents the request data used to generate images. + * @param body Body parameter. * @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. @@ -1654,11 +1640,11 @@ public Mono> getImageGenerationsWithResponseAsync(String de * @return the result of a successful image generation operation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getImageGenerationsWithResponse(String deploymentOrModelName, - BinaryData imageGenerationOptions, RequestOptions requestOptions) { + public Response getImageGenerationsWithResponse(String deploymentOrModelName, BinaryData body, + RequestOptions requestOptions) { final String accept = "application/json"; return service.getImageGenerationsSync(this.getEndpoint(), this.getServiceVersion().getVersion(), - deploymentOrModelName, accept, imageGenerationOptions, requestOptions, Context.NONE); + deploymentOrModelName, accept, body, requestOptions, Context.NONE); } /** @@ -1778,9 +1764,7 @@ public Response generateSpeechFromTextWithResponse(String deployment * * @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 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. + * @param body Body parameter. * @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. @@ -1792,12 +1776,11 @@ public Response generateSpeechFromTextWithResponse(String deployment * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getEmbeddingsWithResponseAsync(String deploymentOrModelName, - BinaryData embeddingsOptions, RequestOptions requestOptions) { + public Mono> getEmbeddingsWithResponseAsync(String deploymentOrModelName, BinaryData body, + RequestOptions requestOptions) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getEmbeddings(this.getEndpoint(), this.getServiceVersion().getVersion(), - deploymentOrModelName, accept, embeddingsOptions, requestOptions, context)); + return FluxUtil.withContext(context -> service.getEmbeddings(this.getEndpoint(), + this.getServiceVersion().getVersion(), deploymentOrModelName, accept, body, requestOptions, context)); } /** @@ -1838,9 +1821,7 @@ public Mono> getEmbeddingsWithResponseAsync(String deployme * * @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 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. + * @param body Body parameter. * @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. @@ -1851,10 +1832,10 @@ public Mono> getEmbeddingsWithResponseAsync(String deployme * recommendations, and other similar scenarios along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getEmbeddingsWithResponse(String deploymentOrModelName, BinaryData embeddingsOptions, + public Response getEmbeddingsWithResponse(String deploymentOrModelName, BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; return service.getEmbeddingsSync(this.getEndpoint(), this.getServiceVersion().getVersion(), - deploymentOrModelName, accept, embeddingsOptions, requestOptions, Context.NONE); + deploymentOrModelName, accept, body, requestOptions, Context.NONE); } } diff --git a/sdk/openai/azure-ai-openai/tsp-location.yaml b/sdk/openai/azure-ai-openai/tsp-location.yaml index 4adae568ae5fa..ec8ee4df493af 100644 --- a/sdk/openai/azure-ai-openai/tsp-location.yaml +++ b/sdk/openai/azure-ai-openai/tsp-location.yaml @@ -1,5 +1,4 @@ directory: specification/cognitiveservices/OpenAI.Inference -additionalDirectories: - - specification/cognitiveservices/OpenAI.Authoring -commit: f98d676317c7ff430241ce16ba8d99142be3581d +commit: 931d7a73aa030f66439b7a1077b48966b049a9b6 repo: Azure/azure-rest-api-specs +additionalDirectories: