次の方法で共有


VectorStoresClient Class

  • java.lang.Object
    • com.azure.ai.agents.persistent.VectorStoresClient

public final class VectorStoresClient

Initializes a new instance of the synchronous VectorStores type.

Method Summary

Modifier and Type Method and Description
VectorStoreFileBatch cancelVectorStoreFileBatch(String vectorStoreId, String batchId)

Cancel a vector store file batch.

Response<BinaryData> cancelVectorStoreFileBatchWithResponse(String vectorStoreId, String batchId, RequestOptions requestOptions)

Cancel a vector store file batch.

VectorStore createVectorStore()

Creates a vector store.

VectorStore createVectorStore(List<String> fileIds, String name, VectorStoreConfiguration storeConfiguration, VectorStoreExpirationPolicy expiresAfter, VectorStoreChunkingStrategyRequest chunkingStrategy, Map<String,String> metadata)

Creates a vector store.

VectorStoreFile createVectorStoreFile(String vectorStoreId)

Create a vector store file by attaching a file to a vector store.

VectorStoreFile createVectorStoreFile(String vectorStoreId, String fileId, VectorStoreDataSource dataSource, VectorStoreChunkingStrategyRequest chunkingStrategy)

Create a vector store file by attaching a file to a vector store.

VectorStoreFileBatch createVectorStoreFileBatch(String vectorStoreId)

Create a vector store file batch.

VectorStoreFileBatch createVectorStoreFileBatch(String vectorStoreId, List<String> fileIds, List<VectorStoreDataSource> dataSources, VectorStoreChunkingStrategyRequest chunkingStrategy)

Create a vector store file batch.

Response<BinaryData> createVectorStoreFileBatchWithResponse(String vectorStoreId, BinaryData createVectorStoreFileBatchRequest, RequestOptions requestOptions)

Create a vector store file batch.

Response<BinaryData> createVectorStoreFileWithResponse(String vectorStoreId, BinaryData createVectorStoreFileRequest, RequestOptions requestOptions)

Create a vector store file by attaching a file to a vector store.

Response<BinaryData> createVectorStoreWithResponse(BinaryData createVectorStoreRequest, RequestOptions requestOptions)

Creates a vector store.

void deleteVectorStore(String vectorStoreId)

Deletes the vector store object matching the specified ID.

void deleteVectorStoreFile(String vectorStoreId, String fileId)

Deletes a vector store file.

VectorStore getVectorStore(String vectorStoreId)

Returns the vector store object matching the specified ID.

VectorStoreFile getVectorStoreFile(String vectorStoreId, String fileId)

Retrieves a vector store file.

VectorStoreFileBatch getVectorStoreFileBatch(String vectorStoreId, String batchId)

Retrieve a vector store file batch.

Response<BinaryData> getVectorStoreFileBatchWithResponse(String vectorStoreId, String batchId, RequestOptions requestOptions)

Retrieve a vector store file batch.

Response<BinaryData> getVectorStoreFileWithResponse(String vectorStoreId, String fileId, RequestOptions requestOptions)

Retrieves a vector store file.

Response<BinaryData> getVectorStoreWithResponse(String vectorStoreId, RequestOptions requestOptions)

Returns the vector store object matching the specified ID.

PagedIterable<VectorStoreFile> listVectorStoreFileBatchFiles(String vectorStoreId, String batchId)

Returns a list of vector store files in a batch.

PagedIterable<BinaryData> listVectorStoreFileBatchFiles(String vectorStoreId, String batchId, RequestOptions requestOptions)

Returns a list of vector store files in a batch.

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.

PagedIterable<VectorStoreFile> listVectorStoreFiles(String vectorStoreId)

Returns a list of vector store files.

PagedIterable<BinaryData> listVectorStoreFiles(String vectorStoreId, RequestOptions requestOptions)

Returns a list of vector store files.

PagedIterable<VectorStoreFile> listVectorStoreFiles(String vectorStoreId, VectorStoreFileStatusFilter filter, Integer limit, ListSortOrder order, String after, String before)

Returns a list of vector store files.

PagedIterable<VectorStore> listVectorStores()

Returns a list of vector stores.

PagedIterable<VectorStore> listVectorStores(Integer limit, ListSortOrder order, String after, String before)

Returns a list of vector stores.

PagedIterable<BinaryData> listVectorStores(RequestOptions requestOptions)

Returns a list of vector stores.

VectorStore modifyVectorStore(String vectorStoreId)

Modifies an existing vector store.

VectorStore modifyVectorStore(String vectorStoreId, String name, VectorStoreExpirationPolicy expiresAfter, Map<String,String> metadata)

Modifies an existing vector store.

Response<BinaryData> modifyVectorStoreWithResponse(String vectorStoreId, BinaryData modifyVectorStoreRequest, RequestOptions requestOptions)

Modifies an existing vector store.

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:

vectorStoreId - Identifier of the vector store.
batchId - Identifier of the file batch.

Returns:

a batch of files attached to a vector store.

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:

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<T>.

createVectorStore

public VectorStore createVectorStore()

Creates a vector store.

Returns:

a vector store is a collection of processed files can be used by the 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:

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.

createVectorStoreFile

public VectorStoreFile createVectorStoreFile(String vectorStoreId)

Create a vector store file by attaching a file to a vector store.

Parameters:

vectorStoreId - Identifier of the vector store.

Returns:

description of a file attached to a vector store.

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:

vectorStoreId - Identifier of the vector store.
fileId - Identifier of the file.
dataSource - Azure asset ID.
chunkingStrategy - The chunking strategy used to chunk the file. If not set, uses the auto strategy.

Returns:

description of a file attached to a vector store.

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.

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.

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:

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<T>.

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:

vectorStoreId - Identifier of the vector store.
createVectorStoreFileRequest - The createVectorStoreFileRequest parameter.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

description of a file attached to a vector store along with Response<T>.

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:

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

deleteVectorStore

public void deleteVectorStore(String vectorStoreId)

Deletes the vector store object matching the specified ID.

Parameters:

vectorStoreId - Identifier of the vector store.

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:

vectorStoreId - Identifier of the vector store.
fileId - Identifier of the file.

getVectorStore

public VectorStore getVectorStore(String vectorStoreId)

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.

getVectorStoreFile

public VectorStoreFile getVectorStoreFile(String vectorStoreId, String fileId)

Retrieves a vector store file.

Parameters:

vectorStoreId - Identifier of the vector store.
fileId - Identifier of the file.

Returns:

description of a file attached to a vector store.

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.

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:

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<T>.

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:

vectorStoreId - Identifier of the vector store.
fileId - Identifier of the file.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

description of a file attached to a vector store along with Response<T>.

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:

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

listVectorStoreFileBatchFiles

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

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:

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<T>.

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:

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<T>.

listVectorStoreFiles

public PagedIterable<VectorStoreFile> listVectorStoreFiles(String vectorStoreId)

Returns a list of vector store files.

Parameters:

vectorStoreId - Identifier of the vector store.

Returns:

the response data for a requested list of items as paginated response with PagedIterable<T>.

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:

vectorStoreId - Identifier of the vector store.
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<T>.

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:

vectorStoreId - Identifier of the vector store.
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<T>.

listVectorStores

public PagedIterable<VectorStore> listVectorStores()

Returns a list of vector stores.

Returns:

the response data for a requested list of items as paginated response with PagedIterable<T>.

listVectorStores

public PagedIterable<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 PagedIterable<T>.

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:

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<T>.

modifyVectorStore

public VectorStore modifyVectorStore(String vectorStoreId)

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.

modifyVectorStore

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

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:

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

Applies to