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.4.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

rs_vector_db-0.1.4-cp311-cp311-manylinux_2_34_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

File details

Details for the file rs_vector_db-0.1.4.tar.gz.

File metadata

  • Download URL: rs_vector_db-0.1.4.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.14.17

File hashes

Hashes for rs_vector_db-0.1.4.tar.gz
Algorithm Hash digest
SHA256 12e6dc68bb64e93d6ffc2552d0837198efb438d6ee4bf8491cb1dec0319ea041
MD5 11b52646e8e5c6fd65b32aa54d7b27d9
BLAKE2b-256 695a80d58e26413dba05a9a01919262c6495efc8b3900c6ce207a9cb609d2dbc

See more details on using hashes here.

File details

Details for the file rs_vector_db-0.1.4-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for rs_vector_db-0.1.4-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 718bf8af41bc017dc76b58e92a7d86546e3ca74dfec0f351cdf38f80a83c63be
MD5 dd803ecc86a38a64022eb2deffb178c7
BLAKE2b-256 004d93d0896edabeda64acdef8162ea31f66409a5c16dee5aefa36ddcd248897

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page