Chatojp is a Rust-based web application that leverages the power of vector embeddings and the Qdrant vector database to embed and manage document files. The application is built using the Axum web framework, and includes features for embedding document content and storing the embeddings in a vector database for efficient retrieval.
Clone the repository:
git clone https://github.com/yourusername/chatojp.git
cd chatojp
Build the project:
cargo build --release
Run the project:
cargo run --release
By default, the server will start and listen on 127.0.0.1:3000. You can test the server by navigating to http://127.0.0.1:3000 in your web browser or using a tool like curl:
curl http://127.0.0.1:3000
This should return:
Hello World!
The embed_documentation function processes each file, generates embeddings using the embed_file function, and upserts the embeddings into the Qdrant vector database.
AppState: Holds the state of the application, including the list of files and the vector database instance.embed_documentation: Asynchronously processes files and stores their embeddings.hello_world: Simple test endpoint.init_router: Initializes the Axum router with the application state and routes.make_client: Creates a new Qdrant client.main: Entry point of the application, initializes logging, creates the application state, and starts the server.QDRANT_API_KEY: The API key for authenticating with the Qdrant instance.QDRANT_URL: The URL of the Qdrant instance.These environment variables can be set in your shell or in a .env file in the root of your project (using dotenv crate is recommended for managing environment variables).
Contributions are welcome! Please fork the repository and open a pull request to contribute.
This project is licensed under the MIT License.
For any questions or suggestions, please open an issue on the GitHub repository or contact the maintainer at gabin.mberik@riives.com
4 commits
Rust
100.0%
Chatojp is a Rust-based web application that leverages the power of vector embeddings and the Qdrant vector database to embed and manage document files. The application is built using the Axum web framework, and includes features for embedding document content and storing the embeddings in a vector database for efficient retrieval.
Clone the repository:
git clone https://github.com/yourusername/chatojp.git
cd chatojp
Build the project:
cargo build --release
Run the project:
cargo run --release
By default, the server will start and listen on 127.0.0.1:3000. You can test the server by navigating to http://127.0.0.1:3000 in your web browser or using a tool like curl:
curl http://127.0.0.1:3000
This should return:
Hello World!
The embed_documentation function processes each file, generates embeddings using the embed_file function, and upserts the embeddings into the Qdrant vector database.
AppState: Holds the state of the application, including the list of files and the vector database instance.embed_documentation: Asynchronously processes files and stores their embeddings.hello_world: Simple test endpoint.init_router: Initializes the Axum router with the application state and routes.make_client: Creates a new Qdrant client.main: Entry point of the application, initializes logging, creates the application state, and starts the server.QDRANT_API_KEY: The API key for authenticating with the Qdrant instance.QDRANT_URL: The URL of the Qdrant instance.These environment variables can be set in your shell or in a .env file in the root of your project (using dotenv crate is recommended for managing environment variables).
Contributions are welcome! Please fork the repository and open a pull request to contribute.
This project is licensed under the MIT License.
For any questions or suggestions, please open an issue on the GitHub repository or contact the maintainer at gabin.mberik@riives.com
4 commits
Rust
100.0%