Skip to main content

VantaDB × LiteLLM

PyO3 cdylib that exposes a VantaDBLiteLLM class — a unified embedding provider that generates embeddings through LiteLLM's embedding() gateway and stores/searches them in VantaDB.

Install

Not on PyPI yet. The vantadb-litellm wheel builds on all release platforms; it goes live with the first providers-v* tag release. Until then, build from a repo checkout.

From PyPI (after the first release)

pip install vantadb-litellm

The LiteLLM SDK is installed automatically (litellm>=1.0,<2).

From source

Requires Python 3.11+ and the LiteLLM SDK. Build the extension with maturin:

pip install litellm
maturin develop --release

Quickstart

from vantadb_litellm import VantaDBLiteLLM

store = VantaDBLiteLLM("/tmp/vantadb-litellm", timeout=30)
emb = store.embed(["hello world"])
rid = store.store("hello world", emb[0], metadata={"lang": "en"})
results = store.search("litellm_store", emb[0], top_k=5)
print(rid, results)

API

Method Signature Description
embed embed(texts) -> list[list[float]] Generate embeddings via litellm.embedding(); forwards timeout (seconds) when set.
store store(text, embedding, metadata=None, key=None) -> str Store a record; returns "<namespace>:<key>". key upserts at a deterministic key, else auto-generated. Metadata values must be str/bool/int/float.
search search(namespace, query_embedding, text_query=None, filters=None, distance_metric=None, top_k=10) -> list[dict] Hybrid vector + BM25 search (distance_metric: "cosine" or "euclidean"/"l2"). Returns full records plus score.
get get(namespace, key) -> dict | None Retrieve a single record, or None if not found.
list list(namespace, limit=100, cursor=None) -> dict Paginated listing: {"records": [...], "next_cursor": int | None}.
delete delete(key, namespace=None) -> bool Delete a record by key; defaults to the instance namespace.
list_namespaces list_namespaces() -> list[str] All namespaces containing at least one record.

Constructor options: VantaDBLiteLLM(db_path, api_key=None, model="text-embedding-3-small", namespace="litellm_store", timeout=None).

Metadata

Release files for vantadb-litellm 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for vantadb-litellm 0.8.0
File
vantadb_litellm-0.8.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details
vantadb_litellm-0.8.0-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details
vantadb_litellm-0.8.0-cp311-abi3-manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.28+ ARM64 Details
vantadb_litellm-0.8.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details

Total release size: 7.3 MB

Release files / vantadb_litellm-0.8.0-cp311-abi3-win_amd64.whl

Download URL vantadb_litellm-0.8.0-cp311-abi3-win_amd64.whl
Size 1.6 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
51dc784a6ed168794978492af7df01a5e73a24a131368c5c49b4260760cb6869
BLAKE2b-256 checksum
How to use checksums
0506a7c10f11c7d83293ad705f7aa5f850c7b619b9c3408a3ea82af20728bd87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / vantadb_litellm-0.8.0-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL vantadb_litellm-0.8.0-cp311-abi3-manylinux_2_28_x86_64.whl
Size 2.0 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
d3fd998f370e12dbf2724f2634069ec28c66e5f7df45401218b80ef121d65d88
BLAKE2b-256 checksum
How to use checksums
e861901017ec443f560691c545ec081a10b60a2714ec03032a551cc04e84869f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / vantadb_litellm-0.8.0-cp311-abi3-manylinux_2_28_aarch64.whl

Download URL vantadb_litellm-0.8.0-cp311-abi3-manylinux_2_28_aarch64.whl
Size 1.9 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
a96039a985f699fc1082b5415981f748e1565c13409c3980dfb8344dd9bc0a1c
BLAKE2b-256 checksum
How to use checksums
72cff6dfceccc3c001ffa4d3cf4970b04008fbdedcc048122b3dabb7fd9b82b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / vantadb_litellm-0.8.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL vantadb_litellm-0.8.0-cp311-abi3-macosx_11_0_arm64.whl
Size 1.8 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
eb0ac6cbecdb61e268cb394508cf3ab15af7c14509f0a1d3ed31a8c5b126935f
BLAKE2b-256 checksum
How to use checksums
0bfa440d099c32fc3150343b39aa72a6cce4a58316ec1e7d639a2ab36e270692
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.8.0 This release

4 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page