Skip to main content

vector_store_files

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

Overview

Namevector_store_files
TypeResource
Idazure.ai_agents.vector_store_files

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe identifier, which can be referenced in API endpoints. Required.
vector_store_idstringThe ID of the vector store that the file is attached to. Required.
chunking_strategyobjectThe strategy used to chunk the file. Required.
created_atstring (date-time)The Unix timestamp (in seconds) for when the vector store file was created. Required.
last_errorobjectThe last error associated with this vector store file. Will be null if there are no errors. Required.
objectstringThe object type, which is always vector_store.file. Required. Default value is "vector_store.file".
statusstringThe status of the vector store file, which can be either in_progress, completed, cancelled, or failed. The status completed indicates that the vector store file is ready for use. Required. Known values are: "in_progress", "completed", "failed", and "cancelled". (in_progress, completed, failed, cancelled)
usage_bytesintegerThe total vector store usage in bytes. Note that this may be different from the original file size. Required.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectvector_store_id, file_id, endpointRetrieves a vector store file.
listselectvector_store_id, endpointfilter, limit, order, after, beforeReturns a list of vector store files.
createinsertvector_store_id, endpointCreate a vector store file by attaching a file to a 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: )
file_idstringIdentifier of the file. Required.
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.
filterstringFilter by file status. Known values are: "in_progress", "completed", "failed", and "cancelled". 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

Retrieves a vector store file.

SELECT
id,
vector_store_id,
chunking_strategy,
created_at,
last_error,
object,
status,
usage_bytes
FROM azure.ai_agents.vector_store_files
WHERE vector_store_id = '{{ vector_store_id }}' -- required
AND file_id = '{{ file_id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
;

INSERT examples

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

INSERT INTO azure.ai_agents.vector_store_files (
vector_store_id,
endpoint
)
SELECT
'{{ vector_store_id }}',
'{{ endpoint }}'
RETURNING
id,
vector_store_id,
chunking_strategy,
created_at,
last_error,
object,
status,
usage_bytes
;