from actian_vectorai_client import VectorAIClient, VectorParams, Distance
with VectorAIClient("localhost:6574") as client:
# Create a basic collection
client.collections.create(
"my_collection",
vectors_config=VectorParams(size=128, distance=Distance.Cosine)
)
print("✓ Collection created"){
"usage": {
"hardware": null
},
"time": 0.06091602,
"status": "ok",
"result": true
}Collections
Create collection
Create a new collection with a specified vector configuration. You must provide the vector dimension and distance metric. Supported distance metrics are Cosine, Euclid, Dot, and Manhattan.
PUT
/
collections
/
{collection_name}
from actian_vectorai_client import VectorAIClient, VectorParams, Distance
with VectorAIClient("localhost:6574") as client:
# Create a basic collection
client.collections.create(
"my_collection",
vectors_config=VectorParams(size=128, distance=Distance.Cosine)
)
print("✓ Collection created"){
"usage": {
"hardware": null
},
"time": 0.06091602,
"status": "ok",
"result": true
}Authorizations
Admin JWT or access token for authenticating requests to VectorAI DB.
Path Parameters
The name of the new collection.
Example:
"my_collection"
Query Parameters
The maximum time to wait for the operation to complete, in seconds.
Example:
30
Body
application/json