Skip to main content

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)

Uploaded Source

Built Distribution

hyperdb_python-0.1.1-py3-none-any.whl (4.2 kB view hashes)

Uploaded 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