Skip to content

rajathshttgr/zoro-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zoro Client

A Python client library for Zoro-DB, a vector search engine.

PyPI API Docs License

Installation

pip install zoro-client

Connecting to Zoro-DB Server

from zoro_client import ZoroClient

client = ZoroClient(host="localhost", port=6464)
# or
client = ZoroClient(url="http://localhost:6464")

Run Zoro-DB locally

docker run -p 6464:6464 ghcr.io/rajathshttgr/zoro-db:dev

Self-Managed Embeddings

You generate embeddings yourself and store raw vectors.

from zoro_client import VectorConfig, Distance

# Create collection
client.create_collection(
    collection_name="test",
    vector_config=VectorConfig(size=100, distance=Distance.COSINE)
)

# Upsert points
import numpy as np

vectors = np.random.rand(5, 100).tolist()

payloads = [
    {"document": "LangChain integration"},
    {"document": "LlamaIndex integration"},
    {"document": "Hybrid search"},
    {"document": "Fast ANN search"},
    {"document": "Python for Machine Learning"},
]

client.upsert_points(
    collection_name="test",
    vectors=vectors,
    ids=[12, 4, 34, 23, 2],
    payloads=payloads,
)

# search query
results = client.search(
    collection_name="test", query_vector=np.random.rand(100).tolist(), limit=2
)

print(results)

Documentation

  • For usage examples and a walkthrough of available methods, see the Usage Examples.
  • For detailed API information, refer to the API Reference.

About

Python client for Zoro-DB vector search engine.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages