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.1.tar.gz
(3.6 kB
view hashes)
Built Distribution
Close
Hashes for hyperdb_python-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4347a2983764ee5d527eb9dfc645a537d9967f04832ec6889f110a6178ce65d |
|
MD5 | aed74b3826c0b7a410911b7876c7d340 |
|
BLAKE2b-256 | af62ca45afc4339137fc10e9f18f81c4cd80dff70e5aaf1284996c5b88cfc22b |