No project description provided
Project description
Vector_DB Python Integration
Overview
rs_vector_db is a Rust-based project designed for efficient vector storage and similarity search. This README provides guidance on integrating Vector_DB with Python. The integration allows you to run the Vector_DB server and perform vector addition and similarity searches using Python scripts.
THIS REQUIRES AN OPENAPI KEY
export OPENAI_API_KEY="your-key-here";
Installation
pip install rs_vector_db
Example Usage
from rs_vector_db import run_server, vector_search, add_vector
import time
URL = "http://127.0.0.1:3000"
# Start Vector_DB server on its own thread
run_server("127.0.0.1:3000", "./metal_gear_db.json")
# Wait for the server to initialize - this might not be necessary
time.sleep(1)
# Add a vector to the DB
results = add_vector(URL, "Why are we still here to suffer", "https://www.youtube.com/watch?v=N_vJMHMBzLM")
print(results)
results = vector_search(URL, "I can still feel the pain in my leg and in my arm", 0.2, 9000)
print(results)
Contributing
If you encounter any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.
Notes for myself
maturin publish
__token__
key
License
This project is licensed under the MIT License.
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
rs_vector_db-0.1.1.tar.gz
(16.7 kB
view hashes)
Built Distribution
Close
Hashes for rs_vector_db-0.1.1-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7e8d0232c33c3e8bd1d19ca11e60175f13b56a0946a029d04dec22943d8bde0 |
|
MD5 | e532d39d41e194c31af92f987ab36333 |
|
BLAKE2b-256 | 45767904e2bbc1505185fb01eaa4ad457f30e3c8fdf90d76dd4c92811709a99c |