diff --git a/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/AssistantsAsyncClient.java b/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/AssistantsAsyncClient.java index ac1a97b68c13..872a1f436733 100644 --- a/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/AssistantsAsyncClient.java +++ b/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/AssistantsAsyncClient.java @@ -272,7 +272,7 @@ public Mono> deleteAssistantWithResponse(String assistantId /** * Creates a new assistant. * - * @param body Body parameter. + * @param assistantCreationOptions The request details to use when creating a new assistant. * @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. @@ -283,10 +283,11 @@ public Mono> deleteAssistantWithResponse(String assistantId */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createAssistant(AssistantCreationOptions body) { + public Mono createAssistant(AssistantCreationOptions assistantCreationOptions) { // Generated convenience method for createAssistantWithResponse RequestOptions requestOptions = new RequestOptions(); - return createAssistantWithResponse(BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono) + return createAssistantWithResponse(BinaryData.fromObject(assistantCreationOptions), requestOptions) + .flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(Assistant.class)); } @@ -1464,7 +1465,7 @@ public Mono getAssistant(String assistantId) { /** * Creates a new thread. Threads contain messages and can be run by assistants. * - * @param body Body parameter. + * @param assistantThreadCreationOptions The details used to create a new assistant thread. * @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. @@ -1475,10 +1476,11 @@ public Mono getAssistant(String assistantId) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createThread(AssistantThreadCreationOptions body) { + public Mono createThread(AssistantThreadCreationOptions assistantThreadCreationOptions) { // Generated convenience method for createThreadWithResponse RequestOptions requestOptions = new RequestOptions(); - return createThreadWithResponse(BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono) + return createThreadWithResponse(BinaryData.fromObject(assistantThreadCreationOptions), requestOptions) + .flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(AssistantThread.class)); } @@ -1724,7 +1726,7 @@ public Mono cancelRun(String threadId, String runId) { /** * Creates a new assistant thread and immediately starts a run using that new thread. * - * @param body Body parameter. + * @param createAndRunThreadOptions The details used when creating and immediately running a new assistant thread. * @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. @@ -1736,10 +1738,11 @@ public Mono cancelRun(String threadId, String runId) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createThreadAndRun(CreateAndRunThreadOptions body) { + public Mono createThreadAndRun(CreateAndRunThreadOptions createAndRunThreadOptions) { // Generated convenience method for createThreadAndRunWithResponse RequestOptions requestOptions = new RequestOptions(); - return createThreadAndRunWithResponse(BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono) + return createThreadAndRunWithResponse(BinaryData.fromObject(createAndRunThreadOptions), requestOptions) + .flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(ThreadRun.class)); } @@ -2232,7 +2235,7 @@ public Mono> getFileWithResponse(String fileId, RequestOpti * Modifies an existing assistant. * * @param assistantId The ID of the assistant to modify. - * @param body Body parameter. + * @param updateAssistantOptions The request details to use when modifying an existing assistant. * @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. @@ -2243,10 +2246,10 @@ public Mono> getFileWithResponse(String fileId, RequestOpti */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAssistant(String assistantId, UpdateAssistantOptions body) { + public Mono updateAssistant(String assistantId, UpdateAssistantOptions updateAssistantOptions) { // Generated convenience method for updateAssistantWithResponse RequestOptions requestOptions = new RequestOptions(); - return updateAssistantWithResponse(assistantId, BinaryData.fromObject(body), requestOptions) + return updateAssistantWithResponse(assistantId, BinaryData.fromObject(updateAssistantOptions), requestOptions) .flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(Assistant.class)); } @@ -2308,7 +2311,7 @@ public Mono updateMessage(String threadId, String messageId) { * Creates a new run for an assistant thread. * * @param threadId The ID of the thread to run. - * @param createRunOptions The details for the run to create. + * @param createRunOptions The details used when creating a new run of an assistant thread. * @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. @@ -3266,7 +3269,7 @@ public Mono> listVectorStoreFileBatchFilesWithResponse(Stri * Modifies an existing thread. * * @param threadId The ID of the thread to modify. - * @param body Body parameter. + * @param updateAssistantThreadOptions The details used to update an existing assistant thread. * @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. @@ -3277,10 +3280,12 @@ public Mono> listVectorStoreFileBatchFilesWithResponse(Stri */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateThread(String threadId, UpdateAssistantThreadOptions body) { + public Mono updateThread(String threadId, + UpdateAssistantThreadOptions updateAssistantThreadOptions) { // Generated convenience method for updateThreadWithResponse RequestOptions requestOptions = new RequestOptions(); - return updateThreadWithResponse(threadId, BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono) + return updateThreadWithResponse(threadId, BinaryData.fromObject(updateAssistantThreadOptions), requestOptions) + .flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(AssistantThread.class)); } @@ -3373,7 +3378,7 @@ public Mono> listVectorStores() { /** * Creates a vector store. * - * @param body Body parameter. + * @param vectorStoreOptions Request object for creating a vector store. * @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. @@ -3385,10 +3390,11 @@ public Mono> listVectorStores() { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createVectorStore(VectorStoreOptions body) { + public Mono createVectorStore(VectorStoreOptions vectorStoreOptions) { // Generated convenience method for createVectorStoreWithResponse RequestOptions requestOptions = new RequestOptions(); - return createVectorStoreWithResponse(BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono) + return createVectorStoreWithResponse(BinaryData.fromObject(vectorStoreOptions), requestOptions) + .flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(VectorStore.class)); } @@ -3418,7 +3424,7 @@ public Mono getVectorStore(String vectorStoreId) { * The ID of the vector store to modify. * * @param vectorStoreId The ID of the vector store to modify. - * @param body Body parameter. + * @param vectorStoreUpdateOptions Request object for updating a vector store. * @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. @@ -3430,11 +3436,12 @@ public Mono getVectorStore(String vectorStoreId) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono modifyVectorStore(String vectorStoreId, VectorStoreUpdateOptions body) { + public Mono modifyVectorStore(String vectorStoreId, + VectorStoreUpdateOptions vectorStoreUpdateOptions) { // Generated convenience method for modifyVectorStoreWithResponse RequestOptions requestOptions = new RequestOptions(); - return modifyVectorStoreWithResponse(vectorStoreId, BinaryData.fromObject(body), requestOptions) - .flatMap(FluxUtil::toMono) + return modifyVectorStoreWithResponse(vectorStoreId, BinaryData.fromObject(vectorStoreUpdateOptions), + requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(VectorStore.class)); } diff --git a/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/AssistantsClient.java b/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/AssistantsClient.java index a9bb04e3f628..7b8f04ed9f74 100644 --- a/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/AssistantsClient.java +++ b/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/AssistantsClient.java @@ -268,7 +268,7 @@ public Response deleteAssistantWithResponse(String assistantId, Requ /** * Creates a new assistant. * - * @param body Body parameter. + * @param assistantCreationOptions The request details to use when creating a new assistant. * @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. @@ -279,10 +279,10 @@ public Response deleteAssistantWithResponse(String assistantId, Requ */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Assistant createAssistant(AssistantCreationOptions body) { + public Assistant createAssistant(AssistantCreationOptions assistantCreationOptions) { // Generated convenience method for createAssistantWithResponse RequestOptions requestOptions = new RequestOptions(); - return createAssistantWithResponse(BinaryData.fromObject(body), requestOptions).getValue() + return createAssistantWithResponse(BinaryData.fromObject(assistantCreationOptions), requestOptions).getValue() .toObject(Assistant.class); } @@ -1497,7 +1497,7 @@ public Assistant getAssistant(String assistantId) { /** * Creates a new thread. Threads contain messages and can be run by assistants. * - * @param body Body parameter. + * @param assistantThreadCreationOptions The details used to create a new assistant thread. * @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. @@ -1508,10 +1508,11 @@ public Assistant getAssistant(String assistantId) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public AssistantThread createThread(AssistantThreadCreationOptions body) { + public AssistantThread createThread(AssistantThreadCreationOptions assistantThreadCreationOptions) { // Generated convenience method for createThreadWithResponse RequestOptions requestOptions = new RequestOptions(); - return createThreadWithResponse(BinaryData.fromObject(body), requestOptions).getValue() + return createThreadWithResponse(BinaryData.fromObject(assistantThreadCreationOptions), requestOptions) + .getValue() .toObject(AssistantThread.class); } @@ -1753,7 +1754,7 @@ public ThreadRun cancelRun(String threadId, String runId) { /** * Creates a new assistant thread and immediately starts a run using that new thread. * - * @param body Body parameter. + * @param createAndRunThreadOptions The details used when creating and immediately running a new assistant thread. * @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. @@ -1764,10 +1765,11 @@ public ThreadRun cancelRun(String threadId, String runId) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public ThreadRun createThreadAndRun(CreateAndRunThreadOptions body) { + public ThreadRun createThreadAndRun(CreateAndRunThreadOptions createAndRunThreadOptions) { // Generated convenience method for createThreadAndRunWithResponse RequestOptions requestOptions = new RequestOptions(); - return createThreadAndRunWithResponse(BinaryData.fromObject(body), requestOptions).getValue() + return createThreadAndRunWithResponse(BinaryData.fromObject(createAndRunThreadOptions), requestOptions) + .getValue() .toObject(ThreadRun.class); } @@ -2248,7 +2250,7 @@ public Response getFileWithResponse(String fileId, RequestOptions re * Modifies an existing assistant. * * @param assistantId The ID of the assistant to modify. - * @param body Body parameter. + * @param updateAssistantOptions The request details to use when modifying an existing assistant. * @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. @@ -2259,10 +2261,11 @@ public Response getFileWithResponse(String fileId, RequestOptions re */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Assistant updateAssistant(String assistantId, UpdateAssistantOptions body) { + public Assistant updateAssistant(String assistantId, UpdateAssistantOptions updateAssistantOptions) { // Generated convenience method for updateAssistantWithResponse RequestOptions requestOptions = new RequestOptions(); - return updateAssistantWithResponse(assistantId, BinaryData.fromObject(body), requestOptions).getValue() + return updateAssistantWithResponse(assistantId, BinaryData.fromObject(updateAssistantOptions), requestOptions) + .getValue() .toObject(Assistant.class); } @@ -2321,7 +2324,7 @@ public ThreadMessage updateMessage(String threadId, String messageId) { * Creates a new run for an assistant thread. * * @param threadId The ID of the thread to run. - * @param createRunOptions The details for the run to create. + * @param createRunOptions The details used when creating a new run of an assistant thread. * @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. @@ -3287,7 +3290,7 @@ public Response listVectorStoreFileBatchFilesWithResponse(String vec * Modifies an existing thread. * * @param threadId The ID of the thread to modify. - * @param body Body parameter. + * @param updateAssistantThreadOptions The details used to update an existing assistant thread. * @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. @@ -3298,10 +3301,11 @@ public Response listVectorStoreFileBatchFilesWithResponse(String vec */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public AssistantThread updateThread(String threadId, UpdateAssistantThreadOptions body) { + public AssistantThread updateThread(String threadId, UpdateAssistantThreadOptions updateAssistantThreadOptions) { // Generated convenience method for updateThreadWithResponse RequestOptions requestOptions = new RequestOptions(); - return updateThreadWithResponse(threadId, BinaryData.fromObject(body), requestOptions).getValue() + return updateThreadWithResponse(threadId, BinaryData.fromObject(updateAssistantThreadOptions), requestOptions) + .getValue() .toObject(AssistantThread.class); } @@ -3393,7 +3397,7 @@ public PageableList listVectorStores() { /** * Creates a vector store. * - * @param body Body parameter. + * @param vectorStoreOptions Request object for creating a vector store. * @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. @@ -3404,10 +3408,10 @@ public PageableList listVectorStores() { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public VectorStore createVectorStore(VectorStoreOptions body) { + public VectorStore createVectorStore(VectorStoreOptions vectorStoreOptions) { // Generated convenience method for createVectorStoreWithResponse RequestOptions requestOptions = new RequestOptions(); - return createVectorStoreWithResponse(BinaryData.fromObject(body), requestOptions).getValue() + return createVectorStoreWithResponse(BinaryData.fromObject(vectorStoreOptions), requestOptions).getValue() .toObject(VectorStore.class); } @@ -3435,7 +3439,7 @@ public VectorStore getVectorStore(String vectorStoreId) { * The ID of the vector store to modify. * * @param vectorStoreId The ID of the vector store to modify. - * @param body Body parameter. + * @param vectorStoreUpdateOptions Request object for updating a vector store. * @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. @@ -3446,11 +3450,11 @@ public VectorStore getVectorStore(String vectorStoreId) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public VectorStore modifyVectorStore(String vectorStoreId, VectorStoreUpdateOptions body) { + public VectorStore modifyVectorStore(String vectorStoreId, VectorStoreUpdateOptions vectorStoreUpdateOptions) { // Generated convenience method for modifyVectorStoreWithResponse RequestOptions requestOptions = new RequestOptions(); - return modifyVectorStoreWithResponse(vectorStoreId, BinaryData.fromObject(body), requestOptions).getValue() - .toObject(VectorStore.class); + return modifyVectorStoreWithResponse(vectorStoreId, BinaryData.fromObject(vectorStoreUpdateOptions), + requestOptions).getValue().toObject(VectorStore.class); } /** diff --git a/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/implementation/AssistantsClientImpl.java b/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/implementation/AssistantsClientImpl.java index 91b0d4ab5fca..49da917db80c 100644 --- a/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/implementation/AssistantsClientImpl.java +++ b/sdk/openai/azure-ai-openai-assistants/src/main/java/com/azure/ai/openai/assistants/implementation/AssistantsClientImpl.java @@ -154,7 +154,7 @@ public interface AssistantsClientService { @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> createAssistant(@HostParam("endpoint") String endpoint, - @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData body, + @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData assistantCreationOptions, RequestOptions requestOptions, Context context); @Post("/assistants") @@ -164,7 +164,7 @@ Mono> createAssistant(@HostParam("endpoint") String endpoin @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) Response createAssistantSync(@HostParam("endpoint") String endpoint, - @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData body, + @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData assistantCreationOptions, RequestOptions requestOptions, Context context); @Get("/assistants") @@ -213,7 +213,8 @@ Response getAssistantSync(@HostParam("endpoint") String endpoint, @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> updateAssistant(@HostParam("endpoint") String endpoint, @PathParam("assistantId") String assistantId, @HeaderParam("accept") String accept, - @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); + @BodyParam("application/json") BinaryData updateAssistantOptions, RequestOptions requestOptions, + Context context); @Post("/assistants/{assistantId}") @ExpectedResponses({ 200 }) @@ -223,7 +224,8 @@ Mono> updateAssistant(@HostParam("endpoint") String endpoin @UnexpectedResponseExceptionType(HttpResponseException.class) Response updateAssistantSync(@HostParam("endpoint") String endpoint, @PathParam("assistantId") String assistantId, @HeaderParam("accept") String accept, - @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); + @BodyParam("application/json") BinaryData updateAssistantOptions, RequestOptions requestOptions, + Context context); @Delete("/assistants/{assistantId}") @ExpectedResponses({ 200 }) @@ -252,8 +254,9 @@ Response deleteAssistantSync(@HostParam("endpoint") String endpoint, @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> createThread(@HostParam("endpoint") String endpoint, - @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData body, - RequestOptions requestOptions, Context context); + @HeaderParam("accept") String accept, + @BodyParam("application/json") BinaryData assistantThreadCreationOptions, RequestOptions requestOptions, + Context context); @Post("/threads") @ExpectedResponses({ 200 }) @@ -262,8 +265,9 @@ Mono> createThread(@HostParam("endpoint") String endpoint, @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) Response createThreadSync(@HostParam("endpoint") String endpoint, - @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData body, - RequestOptions requestOptions, Context context); + @HeaderParam("accept") String accept, + @BodyParam("application/json") BinaryData assistantThreadCreationOptions, RequestOptions requestOptions, + Context context); @Get("/threads/{threadId}") @ExpectedResponses({ 200 }) @@ -293,7 +297,8 @@ Response getThreadSync(@HostParam("endpoint") String endpoint, @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> updateThread(@HostParam("endpoint") String endpoint, @PathParam("threadId") String threadId, @HeaderParam("accept") String accept, - @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); + @BodyParam("application/json") BinaryData updateAssistantThreadOptions, RequestOptions requestOptions, + Context context); @Post("/threads/{threadId}") @ExpectedResponses({ 200 }) @@ -303,7 +308,8 @@ Mono> updateThread(@HostParam("endpoint") String endpoint, @UnexpectedResponseExceptionType(HttpResponseException.class) Response updateThreadSync(@HostParam("endpoint") String endpoint, @PathParam("threadId") String threadId, @HeaderParam("accept") String accept, - @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); + @BodyParam("application/json") BinaryData updateAssistantThreadOptions, RequestOptions requestOptions, + Context context); @Delete("/threads/{threadId}") @ExpectedResponses({ 200 }) @@ -542,7 +548,7 @@ Response cancelRunSync(@HostParam("endpoint") String endpoint, @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> createThreadAndRun(@HostParam("endpoint") String endpoint, - @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData body, + @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData createAndRunThreadOptions, RequestOptions requestOptions, Context context); @Post("/threads/runs") @@ -552,7 +558,7 @@ Mono> createThreadAndRun(@HostParam("endpoint") String endp @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) Response createThreadAndRunSync(@HostParam("endpoint") String endpoint, - @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData body, + @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData createAndRunThreadOptions, RequestOptions requestOptions, Context context); @Get("/threads/{threadId}/runs/{runId}/steps/{stepId}") @@ -721,7 +727,7 @@ Response listVectorStoresSync(@HostParam("endpoint") String endpoint @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> createVectorStore(@HostParam("endpoint") String endpoint, - @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData body, + @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData vectorStoreOptions, RequestOptions requestOptions, Context context); @Post("/vector_stores") @@ -731,7 +737,7 @@ Mono> createVectorStore(@HostParam("endpoint") String endpo @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) @UnexpectedResponseExceptionType(HttpResponseException.class) Response createVectorStoreSync(@HostParam("endpoint") String endpoint, - @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData body, + @HeaderParam("accept") String accept, @BodyParam("application/json") BinaryData vectorStoreOptions, RequestOptions requestOptions, Context context); @Get("/vector_stores/{vectorStoreId}") @@ -762,7 +768,8 @@ Response getVectorStoreSync(@HostParam("endpoint") String endpoint, @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> modifyVectorStore(@HostParam("endpoint") String endpoint, @PathParam("vectorStoreId") String vectorStoreId, @HeaderParam("accept") String accept, - @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); + @BodyParam("application/json") BinaryData vectorStoreUpdateOptions, RequestOptions requestOptions, + Context context); @Post("/vector_stores/{vectorStoreId}") @ExpectedResponses({ 200 }) @@ -772,7 +779,8 @@ Mono> modifyVectorStore(@HostParam("endpoint") String endpo @UnexpectedResponseExceptionType(HttpResponseException.class) Response modifyVectorStoreSync(@HostParam("endpoint") String endpoint, @PathParam("vectorStoreId") String vectorStoreId, @HeaderParam("accept") String accept, - @BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context); + @BodyParam("application/json") BinaryData vectorStoreUpdateOptions, RequestOptions requestOptions, + Context context); @Delete("/vector_stores/{vectorStoreId}") @ExpectedResponses({ 200 }) @@ -1028,7 +1036,7 @@ Response listVectorStoreFileBatchFilesSync(@HostParam("endpoint") St * } * } * - * @param body Body parameter. + * @param assistantCreationOptions The request details to use when creating a new assistant. * @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. @@ -1038,10 +1046,11 @@ Response listVectorStoreFileBatchFilesSync(@HostParam("endpoint") St * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createAssistantWithResponseAsync(BinaryData body, RequestOptions requestOptions) { + public Mono> createAssistantWithResponseAsync(BinaryData assistantCreationOptions, + RequestOptions requestOptions) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createAssistant(this.getEndpoint(), accept, body, requestOptions, context)); + return FluxUtil.withContext(context -> service.createAssistant(this.getEndpoint(), accept, + assistantCreationOptions, requestOptions, context)); } /** @@ -1113,7 +1122,7 @@ public Mono> createAssistantWithResponseAsync(BinaryData bo * } * } * - * @param body Body parameter. + * @param assistantCreationOptions The request details to use when creating a new assistant. * @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. @@ -1122,9 +1131,11 @@ public Mono> createAssistantWithResponseAsync(BinaryData bo * @return represents an assistant that can call the model and use tools along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createAssistantWithResponse(BinaryData body, RequestOptions requestOptions) { + public Response createAssistantWithResponse(BinaryData assistantCreationOptions, + RequestOptions requestOptions) { final String accept = "application/json"; - return service.createAssistantSync(this.getEndpoint(), accept, body, requestOptions, Context.NONE); + return service.createAssistantSync(this.getEndpoint(), accept, assistantCreationOptions, requestOptions, + Context.NONE); } /** @@ -1465,7 +1476,7 @@ public Response getAssistantWithResponse(String assistantId, Request * } * * @param assistantId The ID of the assistant to modify. - * @param body Body parameter. + * @param updateAssistantOptions The request details to use when modifying an existing assistant. * @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. @@ -1475,11 +1486,11 @@ public Response getAssistantWithResponse(String assistantId, Request * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateAssistantWithResponseAsync(String assistantId, BinaryData body, - RequestOptions requestOptions) { + public Mono> updateAssistantWithResponseAsync(String assistantId, + BinaryData updateAssistantOptions, RequestOptions requestOptions) { final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.updateAssistant(this.getEndpoint(), assistantId, accept, body, requestOptions, context)); + return FluxUtil.withContext(context -> service.updateAssistant(this.getEndpoint(), assistantId, accept, + updateAssistantOptions, requestOptions, context)); } /** @@ -1556,7 +1567,7 @@ public Mono> updateAssistantWithResponseAsync(String assist * } * * @param assistantId The ID of the assistant to modify. - * @param body Body parameter. + * @param updateAssistantOptions The request details to use when modifying an existing assistant. * @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. @@ -1565,10 +1576,11 @@ public Mono> updateAssistantWithResponseAsync(String assist * @return represents an assistant that can call the model and use tools along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateAssistantWithResponse(String assistantId, BinaryData body, + public Response updateAssistantWithResponse(String assistantId, BinaryData updateAssistantOptions, RequestOptions requestOptions) { final String accept = "application/json"; - return service.updateAssistantSync(this.getEndpoint(), assistantId, accept, body, requestOptions, Context.NONE); + return service.updateAssistantSync(this.getEndpoint(), assistantId, accept, updateAssistantOptions, + requestOptions, Context.NONE); } /** @@ -1688,7 +1700,7 @@ public Response deleteAssistantWithResponse(String assistantId, Requ * } * } * - * @param body Body parameter. + * @param assistantThreadCreationOptions The details used to create a new assistant thread. * @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. @@ -1698,10 +1710,11 @@ public Response deleteAssistantWithResponse(String assistantId, Requ * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createThreadWithResponseAsync(BinaryData body, RequestOptions requestOptions) { + public Mono> createThreadWithResponseAsync(BinaryData assistantThreadCreationOptions, + RequestOptions requestOptions) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createThread(this.getEndpoint(), accept, body, requestOptions, context)); + return FluxUtil.withContext(context -> service.createThread(this.getEndpoint(), accept, + assistantThreadCreationOptions, requestOptions, context)); } /** @@ -1766,7 +1779,7 @@ public Mono> createThreadWithResponseAsync(BinaryData body, * } * } * - * @param body Body parameter. + * @param assistantThreadCreationOptions The details used to create a new assistant thread. * @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. @@ -1775,9 +1788,11 @@ public Mono> createThreadWithResponseAsync(BinaryData body, * @return information about a single thread associated with an assistant along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createThreadWithResponse(BinaryData body, RequestOptions requestOptions) { + public Response createThreadWithResponse(BinaryData assistantThreadCreationOptions, + RequestOptions requestOptions) { final String accept = "application/json"; - return service.createThreadSync(this.getEndpoint(), accept, body, requestOptions, Context.NONE); + return service.createThreadSync(this.getEndpoint(), accept, assistantThreadCreationOptions, requestOptions, + Context.NONE); } /** @@ -1914,7 +1929,7 @@ public Response getThreadWithResponse(String threadId, RequestOption * } * * @param threadId The ID of the thread to modify. - * @param body Body parameter. + * @param updateAssistantThreadOptions The details used to update an existing assistant thread. * @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. @@ -1924,11 +1939,11 @@ public Response getThreadWithResponse(String threadId, RequestOption * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateThreadWithResponseAsync(String threadId, BinaryData body, - RequestOptions requestOptions) { + public Mono> updateThreadWithResponseAsync(String threadId, + BinaryData updateAssistantThreadOptions, RequestOptions requestOptions) { final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.updateThread(this.getEndpoint(), threadId, accept, body, requestOptions, context)); + return FluxUtil.withContext(context -> service.updateThread(this.getEndpoint(), threadId, accept, + updateAssistantThreadOptions, requestOptions, context)); } /** @@ -1981,7 +1996,7 @@ public Mono> updateThreadWithResponseAsync(String threadId, * } * * @param threadId The ID of the thread to modify. - * @param body Body parameter. + * @param updateAssistantThreadOptions The details used to update an existing assistant thread. * @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. @@ -1990,10 +2005,11 @@ public Mono> updateThreadWithResponseAsync(String threadId, * @return information about a single thread associated with an assistant along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateThreadWithResponse(String threadId, BinaryData body, + public Response updateThreadWithResponse(String threadId, BinaryData updateAssistantThreadOptions, RequestOptions requestOptions) { final String accept = "application/json"; - return service.updateThreadSync(this.getEndpoint(), threadId, accept, body, requestOptions, Context.NONE); + return service.updateThreadSync(this.getEndpoint(), threadId, accept, updateAssistantThreadOptions, + requestOptions, Context.NONE); } /** @@ -2721,7 +2737,7 @@ public Response updateMessageWithResponse(String threadId, String me * } * * @param threadId The ID of the thread to run. - * @param createRunOptions The details for the run to create. + * @param createRunOptions The details used when creating a new run of an assistant thread. * @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. @@ -2855,7 +2871,7 @@ public Mono> createRunWithResponseAsync(String threadId, Bi * } * * @param threadId The ID of the thread to run. - * @param createRunOptions The details for the run to create. + * @param createRunOptions The details used when creating a new run of an assistant thread. * @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. @@ -3795,7 +3811,7 @@ public Response cancelRunWithResponse(String threadId, String runId, * } * } * - * @param body Body parameter. + * @param createAndRunThreadOptions The details used when creating and immediately running a new assistant thread. * @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. @@ -3805,11 +3821,11 @@ public Response cancelRunWithResponse(String threadId, String runId, * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createThreadAndRunWithResponseAsync(BinaryData body, + public Mono> createThreadAndRunWithResponseAsync(BinaryData createAndRunThreadOptions, RequestOptions requestOptions) { final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.createThreadAndRun(this.getEndpoint(), accept, body, requestOptions, context)); + return FluxUtil.withContext(context -> service.createThreadAndRun(this.getEndpoint(), accept, + createAndRunThreadOptions, requestOptions, context)); } /** @@ -3936,7 +3952,7 @@ public Mono> createThreadAndRunWithResponseAsync(BinaryData * } * } * - * @param body Body parameter. + * @param createAndRunThreadOptions The details used when creating and immediately running a new assistant thread. * @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. @@ -3945,9 +3961,11 @@ public Mono> createThreadAndRunWithResponseAsync(BinaryData * @return data representing a single evaluation run of an assistant thread along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createThreadAndRunWithResponse(BinaryData body, RequestOptions requestOptions) { + public Response createThreadAndRunWithResponse(BinaryData createAndRunThreadOptions, + RequestOptions requestOptions) { final String accept = "application/json"; - return service.createThreadAndRunSync(this.getEndpoint(), accept, body, requestOptions, Context.NONE); + return service.createThreadAndRunSync(this.getEndpoint(), accept, createAndRunThreadOptions, requestOptions, + Context.NONE); } /** @@ -4721,7 +4739,7 @@ public Response listVectorStoresWithResponse(RequestOptions requestO * } * } * - * @param body Body parameter. + * @param vectorStoreOptions Request object for creating a vector store. * @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. @@ -4731,11 +4749,11 @@ public Response listVectorStoresWithResponse(RequestOptions requestO * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createVectorStoreWithResponseAsync(BinaryData body, + public Mono> createVectorStoreWithResponseAsync(BinaryData vectorStoreOptions, RequestOptions requestOptions) { final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.createVectorStore(this.getEndpoint(), accept, body, requestOptions, context)); + return FluxUtil.withContext(context -> service.createVectorStore(this.getEndpoint(), accept, vectorStoreOptions, + requestOptions, context)); } /** @@ -4787,7 +4805,7 @@ public Mono> createVectorStoreWithResponseAsync(BinaryData * } * } * - * @param body Body parameter. + * @param vectorStoreOptions Request object for creating a vector store. * @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. @@ -4797,9 +4815,11 @@ public Mono> createVectorStoreWithResponseAsync(BinaryData * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createVectorStoreWithResponse(BinaryData body, RequestOptions requestOptions) { + public Response createVectorStoreWithResponse(BinaryData vectorStoreOptions, + RequestOptions requestOptions) { final String accept = "application/json"; - return service.createVectorStoreSync(this.getEndpoint(), accept, body, requestOptions, Context.NONE); + return service.createVectorStoreSync(this.getEndpoint(), accept, vectorStoreOptions, requestOptions, + Context.NONE); } /** @@ -4943,7 +4963,7 @@ public Response getVectorStoreWithResponse(String vectorStoreId, Req * } * * @param vectorStoreId The ID of the vector store to modify. - * @param body Body parameter. + * @param vectorStoreUpdateOptions Request object for updating a vector store. * @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. @@ -4953,11 +4973,11 @@ public Response getVectorStoreWithResponse(String vectorStoreId, Req * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> modifyVectorStoreWithResponseAsync(String vectorStoreId, BinaryData body, - RequestOptions requestOptions) { + public Mono> modifyVectorStoreWithResponseAsync(String vectorStoreId, + BinaryData vectorStoreUpdateOptions, RequestOptions requestOptions) { final String accept = "application/json"; return FluxUtil.withContext(context -> service.modifyVectorStore(this.getEndpoint(), vectorStoreId, accept, - body, requestOptions, context)); + vectorStoreUpdateOptions, requestOptions, context)); } /** @@ -5007,7 +5027,7 @@ public Mono> modifyVectorStoreWithResponseAsync(String vect * } * * @param vectorStoreId The ID of the vector store to modify. - * @param body Body parameter. + * @param vectorStoreUpdateOptions Request object for updating a vector store. * @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. @@ -5017,11 +5037,11 @@ public Mono> modifyVectorStoreWithResponseAsync(String vect * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response modifyVectorStoreWithResponse(String vectorStoreId, BinaryData body, + public Response modifyVectorStoreWithResponse(String vectorStoreId, BinaryData vectorStoreUpdateOptions, RequestOptions requestOptions) { final String accept = "application/json"; - return service.modifyVectorStoreSync(this.getEndpoint(), vectorStoreId, accept, body, requestOptions, - Context.NONE); + return service.modifyVectorStoreSync(this.getEndpoint(), vectorStoreId, accept, vectorStoreUpdateOptions, + requestOptions, Context.NONE); } /** diff --git a/sdk/openai/azure-ai-openai-assistants/tsp-location.yaml b/sdk/openai/azure-ai-openai-assistants/tsp-location.yaml index 225fd4e27e02..22f00390250d 100644 --- a/sdk/openai/azure-ai-openai-assistants/tsp-location.yaml +++ b/sdk/openai/azure-ai-openai-assistants/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/ai/OpenAI.Assistants -commit: df3cd3e3d50eec1d1da593750e1ea3a4db3f541d +commit: 806117d1552766d1b5cfa763b24f22b1f5ccf666 repo: Azure/azure-rest-api-specs +additionalDirectories: