Connection details
- Default port: 6574.
- Protocol: gRPC over HTTP/2.
- Serialization: Protocol Buffers (protobuf).
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
gRPC endpoints for VectorAI DB.
from actian_vectorai import (
Distance,
PointStruct,
VectorAIClient,
VectorParams,
)
# Connect to gRPC endpoint (default port 6574)
with VectorAIClient("localhost:6574") as client:
# Health check
info = client.health_check()
print(f"Connected to {info['title']} v{info['version']}")
# Create a collection
client.collections.create(
"my_collection",
vectors_config=VectorParams(size=128, distance=Distance.Cosine),
)
# Insert a point
client.points.upsert(
"my_collection",
points=[
PointStruct(
id=1,
vector=[0.1] * 128,
payload={"category": "example"}
)
]
)
# Perform search operations
results = client.points.search(
"my_collection",
vector=[0.1] * 128,
limit=10
)
print(f"Found {len(results)} results")