A hyper-fast local vector database for use with LLM Agents.
Project description
HyperDB
A hyper-fast local vector database for use with LLM Agents. Now accepting SAFEs ($35M cap minimum.)
Installation
Install the package from PyPI:
pip install hyperdb-python
Usage
Here's an example of using HyperDB to store and query documents:
import json
from hyperdb import HyperDB
# Load documents from the JSONL file
documents = []
with open("demo/pokemon.jsonl", "r") as f:
for line in f:
documents.append(json.loads(line))
# Instantiate HyperDB with the list of documents and the key "description"
db = HyperDB(documents, key="info.description")
# Save the HyperDB instance to a file
db.save("demo/pokemon_hyperdb.json")
# Load the HyperDB instance from the save file
db.load("demo/pokemon_hyperdb.json")
# Query the HyperDB instance with a text input
results = db.query("Likes to sleep.", top_k=5)
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
hyperdb-python-0.1.0.tar.gz
(3.6 kB
view hashes)
Built Distribution
Close
Hashes for hyperdb_python-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a938ac7881be56683c08f5af7446ceb21b63c2dda970b32b815b50fb26df98cc |
|
MD5 | 609a7c56690cd73ad08812ff45ab5d1f |
|
BLAKE2b-256 | 7ee42e1045aef8f6105a858882cd61b5d0c2c4bd48718cd90583181eda0a0b2a |