Package com.azure.ai.agents.persistent
Class VectorStoresAsyncClient
java.lang.Object
com.azure.ai.agents.persistent.VectorStoresAsyncClient
Initializes a new instance of the asynchronous PersistentAgentsAdministrationClient type.
-
Method Summary
Modifier and TypeMethodDescriptionCreates a vector store.createVectorStore(List<String> fileIds, String name, VectorStoreConfiguration storeConfiguration, VectorStoreExpirationPolicy expiresAfter, VectorStoreChunkingStrategyRequest chunkingStrategy, Map<String, String> metadata) Creates a vector store.Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> createVectorStoreWithResponse(com.azure.core.util.BinaryData createVectorStoreRequest, com.azure.core.http.rest.RequestOptions requestOptions) Creates a vector store.deleteVectorStore(String vectorStoreId) Deletes the vector store object matching the specified ID.Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> deleteVectorStoreWithResponse(String vectorStoreId, com.azure.core.http.rest.RequestOptions requestOptions) Deletes the vector store object matching the specified ID.getVectorStore(String vectorStoreId) Returns the vector store object matching the specified ID.Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> getVectorStoreWithResponse(String vectorStoreId, com.azure.core.http.rest.RequestOptions requestOptions) Returns the vector store object matching the specified ID.com.azure.core.http.rest.PagedFlux<VectorStore> Returns a list of vector stores.com.azure.core.http.rest.PagedFlux<com.azure.core.util.BinaryData> listVectorStores(com.azure.core.http.rest.RequestOptions requestOptions) Returns a list of vector stores.com.azure.core.http.rest.PagedFlux<VectorStore> listVectorStores(Integer limit, ListSortOrder order, String after, String before) Returns a list of vector stores.modifyVectorStore(String vectorStoreId) Modifies an existing vector store.modifyVectorStore(String vectorStoreId, String name, VectorStoreExpirationPolicy expiresAfter, Map<String, String> metadata) Modifies an existing vector store.Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> modifyVectorStoreWithResponse(String vectorStoreId, com.azure.core.util.BinaryData modifyVectorStoreRequest, com.azure.core.http.rest.RequestOptions requestOptions) Modifies an existing vector store.
-
Method Details
-
createVectorStoreWithResponse
public Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> createVectorStoreWithResponse(com.azure.core.util.BinaryData createVectorStoreRequest, com.azure.core.http.rest.RequestOptions requestOptions) Creates a vector store.Request Body Schema
{ file_ids (Optional): [ String (Optional) ] name: String (Optional) configuration (Optional): { data_sources (Required): [ (Required){ uri: String (Required) type: String(uri_asset/id_asset) (Required) } ] } expires_after (Optional): { anchor: String(last_active_at) (Required) days: int (Required) } chunking_strategy (Optional): { type: String(auto/static) (Required) } metadata (Optional): { String: String (Required) } }Response Body Schema
{ id: String (Required) object: String (Required) created_at: long (Required) name: String (Required) usage_bytes: int (Required) file_counts (Required): { in_progress: int (Required) completed: int (Required) failed: int (Required) cancelled: int (Required) total: int (Required) } status: String(expired/in_progress/completed) (Required) expires_after (Optional): { anchor: String(last_active_at) (Required) days: int (Required) } expires_at: Long (Optional) last_active_at: Long (Required) metadata (Required): { String: String (Required) } }- Parameters:
createVectorStoreRequest- The createVectorStoreRequest parameter.requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- a vector store is a collection of processed files can be used by the `file_search` tool 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.
-
getVectorStoreWithResponse
public Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> getVectorStoreWithResponse(String vectorStoreId, com.azure.core.http.rest.RequestOptions requestOptions) Returns the vector store object matching the specified ID.Response Body Schema
{ id: String (Required) object: String (Required) created_at: long (Required) name: String (Required) usage_bytes: int (Required) file_counts (Required): { in_progress: int (Required) completed: int (Required) failed: int (Required) cancelled: int (Required) total: int (Required) } status: String(expired/in_progress/completed) (Required) expires_after (Optional): { anchor: String(last_active_at) (Required) days: int (Required) } expires_at: Long (Optional) last_active_at: Long (Required) metadata (Required): { String: String (Required) } }- Parameters:
vectorStoreId- Identifier of the vector store.requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- a vector store is a collection of processed files can be used by the `file_search` tool 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.
-
modifyVectorStoreWithResponse
public Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> modifyVectorStoreWithResponse(String vectorStoreId, com.azure.core.util.BinaryData modifyVectorStoreRequest, com.azure.core.http.rest.RequestOptions requestOptions) Modifies an existing vector store.Request Body Schema
{ name: String (Optional) expires_after (Optional): { anchor: String(last_active_at) (Required) days: int (Required) } metadata (Optional): { String: String (Required) } }Response Body Schema
{ id: String (Required) object: String (Required) created_at: long (Required) name: String (Required) usage_bytes: int (Required) file_counts (Required): { in_progress: int (Required) completed: int (Required) failed: int (Required) cancelled: int (Required) total: int (Required) } status: String(expired/in_progress/completed) (Required) expires_after (Optional): { anchor: String(last_active_at) (Required) days: int (Required) } expires_at: Long (Optional) last_active_at: Long (Required) metadata (Required): { String: String (Required) } }- Parameters:
vectorStoreId- Identifier of the vector store.modifyVectorStoreRequest- The modifyVectorStoreRequest parameter.requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- a vector store is a collection of processed files can be used by the `file_search` tool 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.
-
deleteVectorStoreWithResponse
public Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> deleteVectorStoreWithResponse(String vectorStoreId, com.azure.core.http.rest.RequestOptions requestOptions) Deletes the vector store object matching the specified ID.Response Body Schema
{ id: String (Required) deleted: boolean (Required) object: String (Required) }- Parameters:
vectorStoreId- Identifier of the vector store.requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- response object for deleting 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.
-
listVectorStores
public com.azure.core.http.rest.PagedFlux<VectorStore> listVectorStores(Integer limit, ListSortOrder order, String after, String before) Returns a list of vector stores.- Parameters:
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.
-
listVectorStores
Returns a list of vector stores.- 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.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
createVectorStore
public Mono<VectorStore> createVectorStore(List<String> fileIds, String name, VectorStoreConfiguration storeConfiguration, VectorStoreExpirationPolicy expiresAfter, VectorStoreChunkingStrategyRequest chunkingStrategy, Map<String, String> metadata) Creates a vector store.- Parameters:
fileIds- A list of file IDs that the vector store should use. Useful for tools like `file_search` that can access files.name- The name of the vector store.storeConfiguration- The vector store configuration, used when vector store is created from Azure asset URIs.expiresAfter- Details on when this vector store expires.chunkingStrategy- The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. Only applicable if file_ids is non-empty.metadata- A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.- Returns:
- a vector store is a collection of processed files can be used by the `file_search` tool 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.
-
createVectorStore
Creates a vector store.- Returns:
- a vector store is a collection of processed files can be used by the `file_search` tool on successful
completion of
Mono. - 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.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
getVectorStore
Returns the vector store object matching the specified ID.- Parameters:
vectorStoreId- Identifier of the vector store.- Returns:
- a vector store is a collection of processed files can be used by the `file_search` tool 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.
-
modifyVectorStore
public Mono<VectorStore> modifyVectorStore(String vectorStoreId, String name, VectorStoreExpirationPolicy expiresAfter, Map<String, String> metadata) Modifies an existing vector store.- Parameters:
vectorStoreId- Identifier of the vector store.name- The name of the vector store.expiresAfter- Details on when this vector store expires.metadata- A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.- Returns:
- a vector store is a collection of processed files can be used by the `file_search` tool 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.
-
modifyVectorStore
Modifies an existing vector store.- Parameters:
vectorStoreId- Identifier of the vector store.- Returns:
- a vector store is a collection of processed files can be used by the `file_search` tool 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.
-
deleteVectorStore
Deletes the vector store object matching the specified ID.- Parameters:
vectorStoreId- Identifier of the vector store.- Returns:
- response object for deleting 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.
-
listVectorStores
public com.azure.core.http.rest.PagedFlux<com.azure.core.util.BinaryData> listVectorStores(com.azure.core.http.rest.RequestOptions requestOptions) Returns a list of vector stores.Query Parameters
You can add these to a request withQuery Parameters Name Type Required Description 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) created_at: long (Required) name: String (Required) usage_bytes: int (Required) file_counts (Required): { in_progress: int (Required) completed: int (Required) failed: int (Required) cancelled: int (Required) total: int (Required) } status: String(expired/in_progress/completed) (Required) expires_after (Optional): { anchor: String(last_active_at) (Required) days: int (Required) } expires_at: Long (Optional) last_active_at: Long (Required) metadata (Required): { String: String (Required) } }- Parameters:
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.
-