Skip to main content

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)

Uploaded Source

Built Distribution

rs_vector_db-0.1.1-cp311-cp311-manylinux_2_34_x86_64.whl (3.9 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.34+ x86-64

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