用于与 LLM 代理程序一起使用的超快速本地向量数据库。现已接受 SAFE,上限为 1.35 亿美元。
A hyper-fast local vector database for use with LLM Agents. Not entirely a joke.
Want to invest? Now accepting SAFEs ($135M cap minimum.)
Join the HyperDBiscord
Install the package from PyPI:
pip install hyperdb-pythonIf you want to use Hugging Face models with this package, you need to install the sentence-transformers package:
pip install sentence-transformersHere's an example of using HyperDB to store and query documents with information about all 151 original pokemon in an instant:
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
db = HyperDB(documents, key="info.description")
# Save the HyperDB instance to a file
db.save("demo/pokemon_hyperdb.pickle.gz")
# Load the HyperDB instance from the save file
db.load("demo/pokemon_hyperdb.pickle.gz")
# Query the HyperDB instance with a text input
results = db.query("Likes to sleep.", top_k=5)Returns
…*Benchmark Credit: Benim Kıçım
暂无开放 Issues,或尚未同步最近议题。