Skip to main content

vector_stores

Creates, updates, deletes, gets or lists a vector_stores resource.

Overview

Namevector_stores
TypeResource
Idazure.ai_agents.vector_stores

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe identifier, which can be referenced in API endpoints. Required.
namestringThe name of the vector store. Required.
created_atstring (date-time)The Unix timestamp (in seconds) for when the vector store was created. Required.
expires_afterobjectDetails on when this vector store expires.
expires_atstring (date-time)The Unix timestamp (in seconds) for when the vector store will expire.
file_countsobjectFiles count grouped by status processed or being processed by this vector store. Required.
last_active_atstring (date-time)The Unix timestamp (in seconds) for when the vector store was last active. Required.
metadataobjectA 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. Required.
objectstringThe object type, which is always vector_store. Required. Default value is "vector_store".
statusstringThe status of the vector store, which can be either expired, in_progress, or completed. A status of completed indicates that the vector store is ready for use. Required. Known values are: "expired", "in_progress", and "completed". (expired, in_progress, completed)
usage_bytesintegerThe total number of bytes used by the files in the vector store. Required.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectvector_store_id, endpointReturns the vector store object matching the specified ID.
listselectendpointlimit, order, after, beforeReturns a list of vector stores.
createinsertendpointCreates a vector store.
modifyexecvector_store_id, endpointModifies an existing vector store.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
endpointstringThe service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: )
vector_store_idstringIdentifier of the vector store. Required.
afterstring
beforestringA 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. Default value is None.
limitintegerA limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. Default value is None.
orderstringSort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. Known values are: "asc" and "desc". Default value is None.

SELECT examples

Returns the vector store object matching the specified ID.

SELECT
id,
name,
created_at,
expires_after,
expires_at,
file_counts,
last_active_at,
metadata,
object,
status,
usage_bytes
FROM azure.ai_agents.vector_stores
WHERE vector_store_id = '{{ vector_store_id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
;

INSERT examples

Creates a vector store.

INSERT INTO azure.ai_agents.vector_stores (
endpoint
)
SELECT
'{{ endpoint }}'
RETURNING
id,
name,
created_at,
expires_after,
expires_at,
file_counts,
last_active_at,
metadata,
object,
status,
usage_bytes
;

Lifecycle Methods

Modifies an existing vector store.

EXEC azure.ai_agents.vector_stores.modify 
@vector_store_id='{{ vector_store_id }}' --required,
@endpoint='{{ endpoint }}' --required
;