VectorStoresClient Class
- java.
lang. Object - com.
azure. ai. agents. persistent. VectorStoresClient
- com.
public final class VectorStoresClient
Initializes a new instance of the synchronous VectorStores type.
Method Summary
Methods inherited from java.lang.Object
Method Details
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:
Returns:
cancelVectorStoreFileBatchWithResponse
public Response<BinaryData> cancelVectorStoreFileBatchWithResponse(String vectorStoreId, String batchId, 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:
Returns:
createVectorStore
public VectorStore createVectorStore()
Creates a vector store.
Returns:
file_search tool.createVectorStore
public VectorStore createVectorStore(List<String> fileIds, String name, VectorStoreConfiguration storeConfiguration, VectorStoreExpirationPolicy expiresAfter, VectorStoreChunkingStrategyRequest chunkingStrategy, Map<String,String> metadata)
Creates a vector store.
Parameters:
file_search that can
access files.
Returns:
file_search tool.createVectorStoreFile
public VectorStoreFile createVectorStoreFile(String vectorStoreId)
Create a vector store file by attaching a file to a vector store.
Parameters:
Returns:
createVectorStoreFile
public VectorStoreFile createVectorStoreFile(String vectorStoreId, String fileId, VectorStoreDataSource dataSource, VectorStoreChunkingStrategyRequest chunkingStrategy)
Create a vector store file by attaching a file to a vector store.
Parameters:
Returns:
createVectorStoreFileBatch
public VectorStoreFileBatch createVectorStoreFileBatch(String vectorStoreId)
Create a vector store file batch.
Parameters:
Returns:
createVectorStoreFileBatch
public VectorStoreFileBatch createVectorStoreFileBatch(String vectorStoreId, List<String> fileIds, List<VectorStoreDataSource> dataSources, VectorStoreChunkingStrategyRequest chunkingStrategy)
Create a vector store file batch.
Parameters:
Returns:
createVectorStoreFileBatchWithResponse
public Response<BinaryData> createVectorStoreFileBatchWithResponse(String vectorStoreId, BinaryData createVectorStoreFileBatchRequest, 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:
Returns:
createVectorStoreFileWithResponse
public Response<BinaryData> createVectorStoreFileWithResponse(String vectorStoreId, BinaryData createVectorStoreFileRequest, RequestOptions requestOptions)
Create a vector store file by attaching a file to a vector store.
Request Body Schema
{
file_id: String (Optional)
data_source (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)
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:
Returns:
createVectorStoreWithResponse
public Response<BinaryData> createVectorStoreWithResponse(BinaryData createVectorStoreRequest, 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:
Returns:
file_search tool along with
Response<T>.deleteVectorStore
public void deleteVectorStore(String vectorStoreId)
Deletes the vector store object matching the specified ID.
Parameters:
deleteVectorStoreFile
public void deleteVectorStoreFile(String vectorStoreId, String fileId)
Deletes a vector store file. This removes the file‐to‐store link (does not delete the file itself).
Parameters:
getVectorStore
public VectorStore getVectorStore(String vectorStoreId)
Returns the vector store object matching the specified ID.
Parameters:
Returns:
file_search tool.getVectorStoreFile
public VectorStoreFile getVectorStoreFile(String vectorStoreId, String fileId)
Retrieves a vector store file.
Parameters:
Returns:
getVectorStoreFileBatch
public VectorStoreFileBatch getVectorStoreFileBatch(String vectorStoreId, String batchId)
Retrieve a vector store file batch.
Parameters:
Returns:
getVectorStoreFileBatchWithResponse
public Response<BinaryData> getVectorStoreFileBatchWithResponse(String vectorStoreId, String batchId, 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:
Returns:
getVectorStoreFileWithResponse
public Response<BinaryData> getVectorStoreFileWithResponse(String vectorStoreId, String fileId, RequestOptions requestOptions)
Retrieves a vector store file.
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:
Returns:
getVectorStoreWithResponse
public Response<BinaryData> getVectorStoreWithResponse(String vectorStoreId, 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:
Returns:
file_search tool along with
Response<T>.listVectorStoreFileBatchFiles
public PagedIterable<VectorStoreFile> listVectorStoreFileBatchFiles(String vectorStoreId, String batchId)
Returns a list of vector store files in a batch.
Parameters:
Returns:
listVectorStoreFileBatchFiles
public PagedIterable<BinaryData> listVectorStoreFileBatchFiles(String vectorStoreId, String batchId, RequestOptions requestOptions)
Returns a list of vector store files in a batch.
Query 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. |
You can add these to a request with RequestOptions#addQueryParam
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:
Returns:
listVectorStoreFileBatchFiles
public 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:
Returns:
listVectorStoreFiles
public PagedIterable<VectorStoreFile> listVectorStoreFiles(String vectorStoreId)
Returns a list of vector store files.
Parameters:
Returns:
listVectorStoreFiles
public PagedIterable<BinaryData> listVectorStoreFiles(String vectorStoreId, RequestOptions requestOptions)
Returns a list of vector store files.
Query 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. |
You can add these to a request with RequestOptions#addQueryParam
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:
Returns:
listVectorStoreFiles
public PagedIterable<VectorStoreFile> listVectorStoreFiles(String vectorStoreId, VectorStoreFileStatusFilter filter, Integer limit, ListSortOrder order, String after, String before)
Returns a list of vector store files.
Parameters:
Returns:
listVectorStores
public PagedIterable<VectorStore> listVectorStores()
Returns a list of vector stores.
Returns:
listVectorStores
public PagedIterable<VectorStore> listVectorStores(Integer limit, ListSortOrder order, String after, String before)
Returns a list of vector stores.
Parameters:
Returns:
listVectorStores
public PagedIterable<BinaryData> listVectorStores(RequestOptions requestOptions)
Returns a list of vector stores.
Query 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. |
You can add these to a request with RequestOptions#addQueryParam
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:
Returns:
modifyVectorStore
public VectorStore modifyVectorStore(String vectorStoreId)
Modifies an existing vector store.
Parameters:
Returns:
file_search tool.modifyVectorStore
public VectorStore modifyVectorStore(String vectorStoreId, String name, VectorStoreExpirationPolicy expiresAfter, Map<String,String> metadata)
Modifies an existing vector store.
Parameters:
Returns:
file_search tool.modifyVectorStoreWithResponse
public Response<BinaryData> modifyVectorStoreWithResponse(String vectorStoreId, BinaryData modifyVectorStoreRequest, 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:
Returns:
file_search tool along with
Response<T>.