Skip to content

Commit 923ed09

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

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

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

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -640,8 +640,7 @@ Response<BinaryData> listFilesSync(@HostParam("endpoint") String endpoint, @Head
640640
@UnexpectedResponseExceptionType(HttpResponseException.class)
641641
Mono<Response<BinaryData>> uploadFile(@HostParam("endpoint") String endpoint,
642642
@HeaderParam("content-type") String contentType, @HeaderParam("Accept") String accept,
643-
@BodyParam("multipart/form-data") BinaryData uploadFileRequest, RequestOptions requestOptions,
644-
Context context);
643+
@BodyParam("multipart/form-data") BinaryData file, RequestOptions requestOptions, Context context);
645644

646645
// @Multipart not supported by RestProxy
647646
@Post("/files")
@@ -652,8 +651,7 @@ Mono<Response<BinaryData>> uploadFile(@HostParam("endpoint") String endpoint,
652651
@UnexpectedResponseExceptionType(HttpResponseException.class)
653652
Response<BinaryData> uploadFileSync(@HostParam("endpoint") String endpoint,
654653
@HeaderParam("content-type") String contentType, @HeaderParam("Accept") String accept,
655-
@BodyParam("multipart/form-data") BinaryData uploadFileRequest, RequestOptions requestOptions,
656-
Context context);
654+
@BodyParam("multipart/form-data") BinaryData file, RequestOptions requestOptions, Context context);
657655

658656
@Delete("/files/{fileId}")
659657
@ExpectedResponses({ 200 })
@@ -4560,7 +4558,7 @@ public Response<BinaryData> listFilesWithResponse(RequestOptions requestOptions)
45604558
* }
45614559
* </pre>
45624560
*
4563-
* @param uploadFileRequest The uploadFileRequest parameter.
4561+
* @param file The file data to upload and its purpose.
45644562
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
45654563
* @throws HttpResponseException thrown if the request is rejected by server.
45664564
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@@ -4570,12 +4568,11 @@ public Response<BinaryData> listFilesWithResponse(RequestOptions requestOptions)
45704568
* completion of {@link Mono}.
45714569
*/
45724570
@ServiceMethod(returns = ReturnType.SINGLE)
4573-
public Mono<Response<BinaryData>> uploadFileWithResponseAsync(BinaryData uploadFileRequest,
4574-
RequestOptions requestOptions) {
4571+
public Mono<Response<BinaryData>> uploadFileWithResponseAsync(BinaryData file, RequestOptions requestOptions) {
45754572
final String contentType = "multipart/form-data";
45764573
final String accept = "application/json";
4577-
return FluxUtil.withContext(context -> service.uploadFile(this.getEndpoint(), contentType, accept,
4578-
uploadFileRequest, requestOptions, context));
4574+
return FluxUtil.withContext(
4575+
context -> service.uploadFile(this.getEndpoint(), contentType, accept, file, requestOptions, context));
45794576
}
45804577

45814578
/**
@@ -4597,7 +4594,7 @@ public Mono<Response<BinaryData>> uploadFileWithResponseAsync(BinaryData uploadF
45974594
* }
45984595
* </pre>
45994596
*
4600-
* @param uploadFileRequest The uploadFileRequest parameter.
4597+
* @param file The file data to upload and its purpose.
46014598
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
46024599
* @throws HttpResponseException thrown if the request is rejected by server.
46034600
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@@ -4606,11 +4603,10 @@ public Mono<Response<BinaryData>> uploadFileWithResponseAsync(BinaryData uploadF
46064603
* @return represents an assistant that can call the model and use tools along with {@link Response}.
46074604
*/
46084605
@ServiceMethod(returns = ReturnType.SINGLE)
4609-
public Response<BinaryData> uploadFileWithResponse(BinaryData uploadFileRequest, RequestOptions requestOptions) {
4606+
public Response<BinaryData> uploadFileWithResponse(BinaryData file, RequestOptions requestOptions) {
46104607
final String contentType = "multipart/form-data";
46114608
final String accept = "application/json";
4612-
return service.uploadFileSync(this.getEndpoint(), contentType, accept, uploadFileRequest, requestOptions,
4613-
Context.NONE);
4609+
return service.uploadFileSync(this.getEndpoint(), contentType, accept, file, requestOptions, Context.NONE);
46144610
}
46154611

46164612
/**
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
directory: specification/ai/OpenAI.Assistants
2-
commit: 6f175c9c006269a1d0f1928fbc768cacc6ac379a
2+
commit: cce4396201c1592a7655345f3813e67982e679f6
33
repo: Azure/azure-rest-api-specs
4+
additionalDirectories:

0 commit comments

Comments
 (0)