Skip to main content

.

Project description

https://img.shields.io/pypi/v/omnivector.svg https://img.shields.io/travis/vinid/omnivector.svg Documentation Status

OmniVector provides a simple interface to vector databases. We integrate the main functionalities of different vector dbs, generally indexing and searching, into a single interface. This allows us to easily switch between different vector dbs.

db = WeaviateDB()  # or PineconeDB() or LanceDB()

encoder = SentenceTransformerEmbedder("paraphrase-MiniLM-L6-v2", device="cpu")
docs = ["the cat is on the table", "the table is on the cat", "the dog is mining bitcoins"]


ids = list(range(4, len(docs) + 4))
embeddings = encoder.embed(docs)

db.create_index(ids, docs, embeddings)

search_vector = encoder.embed(["the dog is mining bitcoins"])[0]
print(db.vector_search(search_vector, k=1))

Features

  • The AbstractDB requires setting OMNIVECTOR_CONFIG env variable to a config file (an example is in config.yaml)

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

omnivector-0.1.1.tar.gz (5.8 kB view hashes)

Uploaded Source

Built Distribution

omnivector-0.1.1-py2.py3-none-any.whl (7.2 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page