Package com.azure.ai.agents.persistent
Class VectorStoreFileBatchesAsyncClient
java.lang.Object
com.azure.ai.agents.persistent.VectorStoreFileBatchesAsyncClient
Initializes a new instance of the asynchronous PersistentAgentsAdministrationClient type.
-
Method Summary
Modifier and TypeMethodDescriptioncancelVectorStoreFileBatch(String vectorStoreId, String batchId) Cancel a vector store file batch.Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> cancelVectorStoreFileBatchWithResponse(String vectorStoreId, String batchId, com.azure.core.http.rest.RequestOptions requestOptions) Cancel a vector store file batch.createVectorStoreFileBatch(String vectorStoreId) Create a vector store file batch.createVectorStoreFileBatch(String vectorStoreId, List<String> fileIds, List<VectorStoreDataSource> dataSources, VectorStoreChunkingStrategyRequest chunkingStrategy) Create a vector store file batch.Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> createVectorStoreFileBatchWithResponse(String vectorStoreId, com.azure.core.util.BinaryData createVectorStoreFileBatchRequest, com.azure.core.http.rest.RequestOptions requestOptions) Create a vector store file batch.getVectorStoreFileBatch(String vectorStoreId, String batchId) Retrieve a vector store file batch.Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> getVectorStoreFileBatchWithResponse(String vectorStoreId, String batchId, com.azure.core.http.rest.RequestOptions requestOptions) Retrieve a vector store file batch.com.azure.core.http.rest.PagedFlux<VectorStoreFile> listVectorStoreFileBatchFiles(String vectorStoreId, String batchId) Returns a list of vector store files in a batch.com.azure.core.http.rest.PagedFlux<VectorStoreFile> listVectorStoreFileBatchFiles(String vectorStoreId, String batchId, VectorStoreFileStatusFilter filter, Integer limit, ListSortOrder order, String after, String before) Returns a list of vector store files in a batch.com.azure.core.http.rest.PagedFlux<com.azure.core.util.BinaryData> listVectorStoreFileBatchFiles(String vectorStoreId, String batchId, com.azure.core.http.rest.RequestOptions requestOptions) Returns a list of vector store files in a batch.
-
Method Details
-
createVectorStoreFileBatchWithResponse
public Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> createVectorStoreFileBatchWithResponse(String vectorStoreId, com.azure.core.util.BinaryData createVectorStoreFileBatchRequest, com.azure.core.http.rest.RequestOptions requestOptions) Create a vector store file batch.Request Body Schema
{ file_ids (Optional): [ String (Optional) ] data_sources (Optional): [ (Optional){ uri: String (Required) type: String(uri_asset/id_asset) (Required) } ] chunking_strategy (Optional): { type: String(auto/static) (Required) } }Response Body Schema
{ id: String (Required) object: String (Required) created_at: long (Required) vector_store_id: String (Required) status: String(in_progress/completed/cancelled/failed) (Required) file_counts (Required): { in_progress: int (Required) completed: int (Required) failed: int (Required) cancelled: int (Required) total: int (Required) } }- Parameters:
vectorStoreId- Identifier of the vector store.createVectorStoreFileBatchRequest- The createVectorStoreFileBatchRequest parameter.requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- a batch of files attached to a vector store along with
Responseon successful completion ofMono. - Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.
-
getVectorStoreFileBatchWithResponse
public Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> getVectorStoreFileBatchWithResponse(String vectorStoreId, String batchId, com.azure.core.http.rest.RequestOptions requestOptions) Retrieve a vector store file batch.Response Body Schema
{ id: String (Required) object: String (Required) created_at: long (Required) vector_store_id: String (Required) status: String(in_progress/completed/cancelled/failed) (Required) file_counts (Required): { in_progress: int (Required) completed: int (Required) failed: int (Required) cancelled: int (Required) total: int (Required) } }- Parameters:
vectorStoreId- Identifier of the vector store.batchId- Identifier of the file batch.requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- a batch of files attached to a vector store along with
Responseon successful completion ofMono. - Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.
-
cancelVectorStoreFileBatchWithResponse
public Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> cancelVectorStoreFileBatchWithResponse(String vectorStoreId, String batchId, com.azure.core.http.rest.RequestOptions requestOptions) Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible.Response Body Schema
{ id: String (Required) object: String (Required) created_at: long (Required) vector_store_id: String (Required) status: String(in_progress/completed/cancelled/failed) (Required) file_counts (Required): { in_progress: int (Required) completed: int (Required) failed: int (Required) cancelled: int (Required) total: int (Required) } }- Parameters:
vectorStoreId- Identifier of the vector store.batchId- Identifier of the file batch.requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- a batch of files attached to a vector store along with
Responseon successful completion ofMono. - Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.
-
createVectorStoreFileBatch
public Mono<VectorStoreFileBatch> createVectorStoreFileBatch(String vectorStoreId, List<String> fileIds, List<VectorStoreDataSource> dataSources, VectorStoreChunkingStrategyRequest chunkingStrategy) Create a vector store file batch.- Parameters:
vectorStoreId- Identifier of the vector store.fileIds- List of file identifiers.dataSources- List of Azure assets.chunkingStrategy- The chunking strategy used to chunk the file(s). If not set, will use the auto strategy.- Returns:
- a batch of files attached to a vector store on successful completion of
Mono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
createVectorStoreFileBatch
Create a vector store file batch.- Parameters:
vectorStoreId- Identifier of the vector store.- Returns:
- a batch of files attached to a vector store on successful completion of
Mono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
getVectorStoreFileBatch
Retrieve a vector store file batch.- Parameters:
vectorStoreId- Identifier of the vector store.batchId- Identifier of the file batch.- Returns:
- a batch of files attached to a vector store on successful completion of
Mono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
cancelVectorStoreFileBatch
Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible.- Parameters:
vectorStoreId- Identifier of the vector store.batchId- Identifier of the file batch.- Returns:
- a batch of files attached to a vector store on successful completion of
Mono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
listVectorStoreFileBatchFiles
public com.azure.core.http.rest.PagedFlux<VectorStoreFile> listVectorStoreFileBatchFiles(String vectorStoreId, String batchId, VectorStoreFileStatusFilter filter, Integer limit, ListSortOrder order, String after, String before) Returns a list of vector store files in a batch.- Parameters:
vectorStoreId- Identifier of the vector store.batchId- Identifier of the file batch.filter- Filter by file status.limit- A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.order- Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.after- A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.before- A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.- Returns:
- the response data for a requested list of items as paginated response with
PagedFlux. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
listVectorStoreFileBatchFiles
public com.azure.core.http.rest.PagedFlux<VectorStoreFile> listVectorStoreFileBatchFiles(String vectorStoreId, String batchId) Returns a list of vector store files in a batch.- Parameters:
vectorStoreId- Identifier of the vector store.batchId- Identifier of the file batch.- Returns:
- the response data for a requested list of items as paginated response with
PagedFlux. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
listVectorStoreFileBatchFiles
public com.azure.core.http.rest.PagedFlux<com.azure.core.util.BinaryData> listVectorStoreFileBatchFiles(String vectorStoreId, String batchId, com.azure.core.http.rest.RequestOptions requestOptions) Returns a list of vector store files in a batch.Query Parameters
You can add these to a request withQuery Parameters Name Type Required Description filter String No Filter by file status. Allowed values: "in_progress", "completed", "failed", "cancelled". limit Integer No A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. order String No Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. Allowed values: "asc", "desc". after String No A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. before String No A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. RequestOptions.addQueryParam(java.lang.String, java.lang.String)Response Body Schema
{ id: String (Required) object: String (Required) usage_bytes: int (Required) created_at: long (Required) vector_store_id: String (Required) status: String(in_progress/completed/failed/cancelled) (Required) last_error (Required): { code: String(server_error/invalid_file/unsupported_file) (Required) message: String (Required) } chunking_strategy (Required): { type: String(other/static) (Required) } }- Parameters:
vectorStoreId- Identifier of the vector store.batchId- Identifier of the file batch.requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- the response data for a requested list of items as paginated response with
PagedFlux. - Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.
-