| Crates.io | dragon_db |
| lib.rs | dragon_db |
| version | 0.10.1 |
| created_at | 2024-07-24 02:26:35.484903+00 |
| updated_at | 2024-08-12 23:22:56.860071+00 |
| description | An embedding database with helper functions for RAG |
| homepage | |
| repository | https://github.com/portalcorp/dRAGon |
| max_upload_size | |
| id | 1313594 |
| size | 264,489 |
dRAGon is an embedded Vector database in Rust with helper functions for Retrieval-Augmented Generation (RAG). It provides a powerful and flexible solution for managing and querying vector embeddings, making it ideal for various natural language processing and machine learning applications.
protoc (Protocol Buffers Compiler)protocbrew install protobuf
sudo apt-get install protobuf-compiler
choco install protobuf
or
scoop install protobuf
Clone the repository:
git clone https://github.com/portalcorp/dRAGon.git
cd dRAGon
Build the project:
cargo build --release
Run the server:
cargo run
dRAGon can be used as a library in your Rust projects. Here's how you can import and use it:
cargo add dragon_db
use dragon_db::start_server;
#[rocket::launch]
pub async fn run() -> _ {
start_server().await
}
This code snippet demonstrates how to start the dRAGon server from your own package. It uses the start_server() function from the dRAGon library to configure and launch the server.
Once the server is running, you can interact with it using HTTP requests. Here are some example API calls:
startLine: 282
endLine: 433
For detailed API documentation, refer to the docs UI available at http://localhost:8000/docs when running the server.
For detailed API documentation, refer to the docs UI available at http://localhost:8000/docs when running the server.
The dRAGon server can be configured using environment variables:
ROCKET_PORT: The port on which the server will listen (default: 8000)BASE_PATH: The base path on which the server will listen (default: "/")DB_PATH: The path to store the database files (default: "data/lance")COLLECTION_NAME: The name of the default collection (default: "vectors")EMBEDDING_MODEL: The embedding model to use (default: "BGESmallENV15")To set up the development environment:
cargo buildcargo runTo run the test suite:
cargo test -- --test-threads=1
We disable parallel database tests to avoid creating multiple temporary databases and increasing memory usage.
dRAGon is released under the MIT License. See the LICENSE file for details.