Class VectorStoreFileBatchesClient

java.lang.Object
com.azure.ai.agents.persistent.VectorStoreFileBatchesClient

public final class VectorStoreFileBatchesClient extends Object
Initializes a new instance of the synchronous PersistentAgentsAdministrationClient type.
  • Method Details

    • createVectorStoreFileBatchWithResponse

      public 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 Response.
      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 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 Response.
      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 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 Response.
      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 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.
      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

      public VectorStoreFileBatch createVectorStoreFileBatch(String vectorStoreId)
      Create a vector store file batch.
      Parameters:
      vectorStoreId - Identifier of the vector store.
      Returns:
      a batch of files attached to a vector store.
      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

      public VectorStoreFileBatch getVectorStoreFileBatch(String vectorStoreId, String batchId)
      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.
      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

      public VectorStoreFileBatch cancelVectorStoreFileBatch(String vectorStoreId, String batchId)
      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.
      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.PagedIterable<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 PagedIterable.
      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.PagedIterable<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 PagedIterable.
      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.PagedIterable<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

      Query Parameters
      NameTypeRequiredDescription
      filterStringNoFilter by file status. Allowed values: "in_progress", "completed", "failed", "cancelled".
      limitIntegerNoA limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
      orderStringNoSort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. Allowed values: "asc", "desc".
      afterStringNoA 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.
      beforeStringNoA 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.
      You can add these to a request with 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 PagedIterable.
      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.