Skip to content

Commit b362f55

Browse files
author
SDKAuto
committed
CodeGen from PR 33693 in Azure/azure-rest-api-specs
Merge 66401ab826210c72b3319330c30f23db425a241d into b0a48bcbffead733affe03944ef09f5e8d12f8c8
1 parent 4cbf7a5 commit b362f55

File tree

2 files changed

+11
-16
lines changed

2 files changed

+11
-16
lines changed

sdk/openai/azure-ai-openai/src/main/java/com/azure/ai/openai/implementation/OpenAIClientImpl.java

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,7 @@ Response<BinaryData> listFilesSync(@HostParam("endpoint") String endpoint, @Head
403403
@UnexpectedResponseExceptionType(HttpResponseException.class)
404404
Mono<Response<BinaryData>> uploadFile(@HostParam("endpoint") String endpoint,
405405
@HeaderParam("content-type") String contentType, @HeaderParam("Accept") String accept,
406-
@BodyParam("multipart/form-data") BinaryData uploadFileRequest, RequestOptions requestOptions,
407-
Context context);
406+
@BodyParam("multipart/form-data") BinaryData file, RequestOptions requestOptions, Context context);
408407

409408
// @Multipart not supported by RestProxy
410409
@Post("/files")
@@ -415,8 +414,7 @@ Mono<Response<BinaryData>> uploadFile(@HostParam("endpoint") String endpoint,
415414
@UnexpectedResponseExceptionType(HttpResponseException.class)
416415
Response<BinaryData> uploadFileSync(@HostParam("endpoint") String endpoint,
417416
@HeaderParam("content-type") String contentType, @HeaderParam("Accept") String accept,
418-
@BodyParam("multipart/form-data") BinaryData uploadFileRequest, RequestOptions requestOptions,
419-
Context context);
417+
@BodyParam("multipart/form-data") BinaryData file, RequestOptions requestOptions, Context context);
420418

421419
@Delete("/files/{fileId}")
422420
@ExpectedResponses({ 200 })
@@ -2473,7 +2471,7 @@ public Response<BinaryData> listFilesWithResponse(RequestOptions requestOptions)
24732471
* }
24742472
* </pre>
24752473
*
2476-
* @param uploadFileRequest The uploadFileRequest parameter.
2474+
* @param file The file and its purpose to upload.
24772475
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
24782476
* @throws HttpResponseException thrown if the request is rejected by server.
24792477
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@@ -2483,12 +2481,11 @@ public Response<BinaryData> listFilesWithResponse(RequestOptions requestOptions)
24832481
* completion of {@link Mono}.
24842482
*/
24852483
@ServiceMethod(returns = ReturnType.SINGLE)
2486-
public Mono<Response<BinaryData>> uploadFileWithResponseAsync(BinaryData uploadFileRequest,
2487-
RequestOptions requestOptions) {
2484+
public Mono<Response<BinaryData>> uploadFileWithResponseAsync(BinaryData file, RequestOptions requestOptions) {
24882485
final String contentType = "multipart/form-data";
24892486
final String accept = "application/json";
2490-
return FluxUtil.withContext(context -> service.uploadFile(this.getEndpoint(), contentType, accept,
2491-
uploadFileRequest, requestOptions, context));
2487+
return FluxUtil.withContext(
2488+
context -> service.uploadFile(this.getEndpoint(), contentType, accept, file, requestOptions, context));
24922489
}
24932490

24942491
/**
@@ -2510,7 +2507,7 @@ public Mono<Response<BinaryData>> uploadFileWithResponseAsync(BinaryData uploadF
25102507
* }
25112508
* </pre>
25122509
*
2513-
* @param uploadFileRequest The uploadFileRequest parameter.
2510+
* @param file The file and its purpose to upload.
25142511
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
25152512
* @throws HttpResponseException thrown if the request is rejected by server.
25162513
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@@ -2519,11 +2516,10 @@ public Mono<Response<BinaryData>> uploadFileWithResponseAsync(BinaryData uploadF
25192516
* @return represents an assistant that can call the model and use tools along with {@link Response}.
25202517
*/
25212518
@ServiceMethod(returns = ReturnType.SINGLE)
2522-
public Response<BinaryData> uploadFileWithResponse(BinaryData uploadFileRequest, RequestOptions requestOptions) {
2519+
public Response<BinaryData> uploadFileWithResponse(BinaryData file, RequestOptions requestOptions) {
25232520
final String contentType = "multipart/form-data";
25242521
final String accept = "application/json";
2525-
return service.uploadFileSync(this.getEndpoint(), contentType, accept, uploadFileRequest, requestOptions,
2526-
Context.NONE);
2522+
return service.uploadFileSync(this.getEndpoint(), contentType, accept, file, requestOptions, Context.NONE);
25272523
}
25282524

25292525
/**
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
directory: specification/cognitiveservices/OpenAI.Inference
2-
additionalDirectories:
3-
- specification/cognitiveservices/OpenAI.Authoring
4-
commit: 1873aba404990976cddd425ebb54b72b58e56c23
2+
commit: cce4396201c1592a7655345f3813e67982e679f6
53
repo: Azure/azure-rest-api-specs
4+
additionalDirectories:

0 commit comments

Comments
 (0)