Vector Stores - Create Vector Store
Creates a vector store.
POST {endpoint}/vector_stores?api-version=v1
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
endpoint
|
path | True |
string (uri) |
Project endpoint in the form of: https://<aiservices-id>.services.ai.azure.com/api/projects/<project-name> |
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Request Body
Name | Type | Description |
---|---|---|
chunking_strategy | VectorStoreChunkingStrategyRequest: |
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. |
configuration |
The vector store configuration, used when vector store is created from Azure asset URIs. |
|
expires_after |
Details on when this vector store expires |
|
file_ids |
string[] |
A list of file IDs that the vector store should use. Useful for tools like |
metadata |
object |
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. |
name |
string |
The name of the vector store. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
The request has succeeded. |
|
Other Status Codes |
An unexpected error response. |
Security
OAuth2Auth
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/v2.0/authorize
Scopes
Name | Description |
---|---|
https://ai.azure.com/.default |
Examples
Vector |
Vector |
VectorStores_CreateVectorStore_MaximumSet
Sample request
POST {endpoint}/vector_stores?api-version=v1
{
"file_ids": [
"ftbzgxmtythuxbhs",
"ftbzgxmtythuxbhs",
"ftbzgxmtythuxbhs",
"ftbzgxmtythuxbhs",
"ftbzgxmtythuxbhs",
"ftbzgxmtythuxbhs",
"ftbzgxmtythuxbhs",
"ftbzgxmtythuxbhs",
"ftbzgxmtythuxbhs",
"ftbzgxmtythuxbhs",
"ftbzgxmtythuxbhs",
"ftbzgxmtythuxbhs",
"ftbzgxmtythuxbhs",
"ftbzgxmtythuxbhs",
"ftbzgxmtythuxbhs",
"ftbzgxmtythuxbhs",
"ftbzgxmtythuxbhs",
"ftbzgxmtythuxbhs",
"ftbzgxmtythuxbhs",
"ftbzgxmtythuxbhs",
"ftbzgxmtythuxbhs",
"ftbzgxmtythuxbhs",
"ftbzgxmtythuxbhs",
"ftbzgxmtythuxbhs",
"ftbzgxmtythuxbhs",
"ftbzgxmtythuxbhs",
"ftbzgxmtythuxbhs",
"ftbzgxmtythuxbhs",
"ftbzgxmtythuxbhs",
"ftbzgxmtythuxbhs",
"ftbzgxmtythuxbhs",
"ftbzgxmtythuxbhs"
],
"name": "vidfcwh",
"configuration": {
"data_sources": [
{
"uri": "jtookuzhwojyylbips",
"type": "uri_asset"
}
]
},
"expires_after": {
"anchor": "last_active_at",
"days": 102
},
"chunking_strategy": {
"type": "VectorStoreChunkingStrategyRequest"
},
"metadata": {
"key3221": "kpsoqourrnirxgzrl"
}
}
Sample response
{
"id": "bxcw",
"object": "vector_store",
"created_at": 6,
"name": "nhjsetafmqp",
"usage_bytes": 9,
"file_counts": {
"in_progress": 14,
"completed": 21,
"failed": 12,
"cancelled": 1,
"total": 25
},
"status": "expired",
"expires_after": {
"anchor": "last_active_at",
"days": 102
},
"expires_at": 22,
"last_active_at": 14,
"metadata": {
"key1986": "qlxm"
}
}
VectorStores_CreateVectorStore_MinimumSet
Sample request
POST {endpoint}/vector_stores?api-version=v1
{}
Sample response
{
"id": "bxcw",
"object": "vector_store",
"created_at": 6,
"name": "nhjsetafmqp",
"usage_bytes": 9,
"file_counts": {
"in_progress": 14,
"completed": 21,
"failed": 12,
"cancelled": 1,
"total": 25
},
"status": "expired",
"last_active_at": 14,
"metadata": {}
}
Definitions
Name | Description |
---|---|
Agent |
Describes the error information returned by the agents API. |
AgentV1Error |
Error payload returned by the agents API. |
Vector |
A vector store is a collection of processed files can be used by the |
Vector |
The default strategy. This strategy currently uses a max_chunk_size_tokens of 800 and chunk_overlap_tokens of 400. |
Vector |
Type of chunking strategy |
Vector |
Vector storage configuration is the list of data sources, used when multiple files can be used for the enterprise file search. |
Vector |
The structure, containing Azure asset URI path and the asset type of the file used as a data source for the enterprise file search. |
Vector |
Type of vector storage asset. Asset type may be a uri_asset, in this case it should contain asset URI ID, in the case of id_asset it should contain the data ID. |
Vector |
The expiration policy for a vector store. |
Vector |
Describes the relationship between the days and the expiration of this vector store |
Vector |
Counts of files processed or being processed by this vector store grouped by status. |
Vector |
Request object for creating a vector store. |
Vector |
Options to configure a vector store static chunking strategy. |
Vector |
A statically configured chunking strategy. |
Vector |
Vector store possible status |
AgentErrorDetail
Describes the error information returned by the agents API.
Name | Type | Description |
---|---|---|
code |
string |
Machine-readable error code. |
message |
string |
Human-readable description of the error. |
param |
string |
Name of the parameter that caused the error, if applicable. |
type |
string |
Error type identifier (e.g. |
AgentV1Error
Error payload returned by the agents API.
Name | Type | Description |
---|---|---|
error |
Represents the error. |
VectorStore
A vector store is a collection of processed files can be used by the file_search
tool.
Name | Type | Description |
---|---|---|
created_at |
integer (unixtime) |
The Unix timestamp (in seconds) for when the vector store was created. |
expires_after |
Details on when this vector store expires |
|
expires_at |
integer (unixtime) |
The Unix timestamp (in seconds) for when the vector store will expire. |
file_counts |
Files count grouped by status processed or being processed by this vector store. |
|
id |
string |
The identifier, which can be referenced in API endpoints. |
last_active_at |
integer (unixtime) |
The Unix timestamp (in seconds) for when the vector store was last active. |
metadata |
object |
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. |
name |
string |
The name of the vector store. |
object |
enum:
vector_store |
The object type, which is always |
status |
The status of the vector store, which can be either |
|
usage_bytes |
integer (int32) |
The total number of bytes used by the files in the vector store. |
VectorStoreAutoChunkingStrategyRequest
The default strategy. This strategy currently uses a max_chunk_size_tokens of 800 and chunk_overlap_tokens of 400.
Name | Type | Description |
---|---|---|
type |
string:
auto |
The object type. |
VectorStoreChunkingStrategyRequestType
Type of chunking strategy
Value | Description |
---|---|
auto | |
static |
VectorStoreConfiguration
Vector storage configuration is the list of data sources, used when multiple files can be used for the enterprise file search.
Name | Type | Description |
---|---|---|
data_sources |
Data sources |
VectorStoreDataSource
The structure, containing Azure asset URI path and the asset type of the file used as a data source for the enterprise file search.
Name | Type | Description |
---|---|---|
type |
The asset type |
|
uri |
string |
Asset URI. |
VectorStoreDataSourceAssetType
Type of vector storage asset. Asset type may be a uri_asset, in this case it should contain asset URI ID, in the case of id_asset it should contain the data ID.
Value | Description |
---|---|
uri_asset |
Azure URI |
id_asset |
The data ID |
VectorStoreExpirationPolicy
The expiration policy for a vector store.
Name | Type | Description |
---|---|---|
anchor |
Anchor timestamp after which the expiration policy applies. Supported anchors: |
|
days |
integer (int32) minimum: 1maximum: 365 |
The anchor timestamp after which the expiration policy applies. |
VectorStoreExpirationPolicyAnchor
Describes the relationship between the days and the expiration of this vector store
Value | Description |
---|---|
last_active_at |
The expiration policy is based on the last time the vector store was active. |
VectorStoreFileCount
Counts of files processed or being processed by this vector store grouped by status.
Name | Type | Description |
---|---|---|
cancelled |
integer (int32) |
The number of files that were cancelled. |
completed |
integer (int32) |
The number of files that have been successfully processed. |
failed |
integer (int32) |
The number of files that have failed to process. |
in_progress |
integer (int32) |
The number of files that are currently being processed. |
total |
integer (int32) |
The total number of files. |
VectorStoreOptions
Request object for creating a vector store.
Name | Type | Description |
---|---|---|
chunking_strategy | VectorStoreChunkingStrategyRequest: |
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. |
configuration |
The vector store configuration, used when vector store is created from Azure asset URIs. |
|
expires_after |
Details on when this vector store expires |
|
file_ids |
string[] |
A list of file IDs that the vector store should use. Useful for tools like |
metadata |
object |
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. |
name |
string |
The name of the vector store. |
VectorStoreStaticChunkingStrategyOptions
Options to configure a vector store static chunking strategy.
Name | Type | Description |
---|---|---|
chunk_overlap_tokens |
integer (int32) |
The number of tokens that overlap between chunks. The default value is 400. Note that the overlap must not exceed half of max_chunk_size_tokens. |
max_chunk_size_tokens |
integer (int32) minimum: 100maximum: 4096 |
The maximum number of tokens in each chunk. The default value is 800. The minimum value is 100 and the maximum value is 4096. |
VectorStoreStaticChunkingStrategyRequest
A statically configured chunking strategy.
Name | Type | Description |
---|---|---|
static |
The options for the static chunking strategy. |
|
type |
string:
static |
The object type. |
VectorStoreStatus
Vector store possible status
Value | Description |
---|---|
expired |
expired status indicates that this vector store has expired and is no longer available for use. |
in_progress |
in_progress status indicates that this vector store is still processing files. |
completed |
completed status indicates that this vector store is ready for use. |