cosmos db fix error vector capability not enabled although it is enabled
Walter
0
Reputation points
Vector search is activated:
error message:
CosmosHttpResponseError: (BadRequest) Message: {"Errors":["A Container Vector Policy has been provided, but the capability has not been enabled on your account
I have activated it and have waited well over 15min
zone=EU west
vector_embedding_policy = {
"vectorEmbeddings": [
{
"path":"/Embedding",
"dataType":"float32",
"distanceFunction":"cosine",
"dimensions":1536
}
]
}
# Define the indexing policy for the collection
indexing_policy = {
"includedPaths": [
{
"path": "/*"
}
],
"excludedPaths": [
{
"path": "/\"_etag\"/?"
}
],
"vectorIndexes": [
{"path": "/Embedding",
"type": "diskANN"
}
]
}
# Create the product catalog collection
await database.create_container_if_not_exists(
id=container_name,
partition_key=PartitionKey(path='/customer_number'),
indexing_policy=indexing_policy,
vector_embedding_policy=vector_embedding_policy,
offer_throughput=ThroughputProperties(auto_scale_max_throughput=4000))
Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,864 questions
Sign in to answer