RAG server for ai2apps.
Project description
aa-rag
Description
RAG Server for AI2APPS. This server provides a Retrieval-Augmented Generation (RAG) API to support advanced AI applications.
Requirements
-
OpenAI API Key:
- The service supports only the OpenAI interface style.
- Ensure your
.envfile includes the following line:OPENAI_API_KEY=<your_openai_api_key>
-
Environment Setup:
- Make sure your environment is properly configured to load environment variables from a
.envfile. - For complete details on how to configure the application using environment variables and a
.envfile, please see the Configuration Parameters document.
- Make sure your environment is properly configured to load environment variables from a
Installation
Installation via PyPI
Install the package from PyPI:
pip install aa-rag
Installation via Source Code
You can choose one of the following installation methods: uv (recommended) or requirements.txt.
Option 1: UV Installation (Recommended)
-
Install uv:
- On macOS, it is recommended to use Homebrew:
brew install uv
- For other operating systems, please refer to the uv installation guide.
- On macOS, it is recommended to use Homebrew:
-
Clone the Repository:
git clone https://github.com/continue-ai-company/aa_rag.git cd aa_rag
-
Synchronize Dependencies:
- Install dependencies as specified in the
uv.lockfile:uv sync - This command will create the virtual environment in the current project directory and install all necessary dependencies.
- Install dependencies as specified in the
Option 2: Installation via requirements.txt
-
Clone the Repository:
git clone https://github.com/continue-ai-company/aa_rag.git cd aa_rag
-
Environment Setup:
- You can use your existing Python environment or create a new one, based on your preference.
-
Install Dependencies:
pip install -r requirements.txt
Usage
-
Start the Web Server:
-
If you installed the package via PyPI, you can run the server using the following command:
aarag
-
If you installed the package from source code and are using the
uvtool, you can run the server using the following command:uv run aarag
-
If you installed the package from source code and are using the
requirements.txtfile, you can run the server using the following command:source ./.venv/bin/activate export PYTHONPATH=$(pwd)/src # Set the PYTHONPATH to the src directory python -m aa_rag.main
-
-
Access the API Documentation:
- Open your browser and navigate to:
http://localhost:222/docs- This page provides an interactive Swagger UI to explore and test all available APIs.
Features
- Full support for OpenAI API integrations.
- Interactive API documentation using Swagger UI.
- Simplified RAG workflow for AI applications.
GitHub
Find the source code and related projects on GitHub and AI2APPS.
License
This project is licensed under the MIT License.
Support
For any issues or feature requests, please open a ticket in the GitHub Issues.
Contributing
We welcome contributions! Please follow these steps:
- Fork the repository.
- Create a feature branch.
- Commit your changes.
- Submit a pull request.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aa_rag-0.2.1.tar.gz.
File metadata
- Download URL: aa_rag-0.2.1.tar.gz
- Upload date:
- Size: 228.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5079a973b6458b752caf9e4688345d5e2c7b96af8a309531e6d05607c571be98
|
|
| MD5 |
6a7578f11f2e10786a665f33b97e19e7
|
|
| BLAKE2b-256 |
756934f923a62f3f4309a40f8ba6d5cbfed637bf43159743caa9901364eca508
|
File details
Details for the file aa_rag-0.2.1-py3-none-any.whl.
File metadata
- Download URL: aa_rag-0.2.1-py3-none-any.whl
- Upload date:
- Size: 35.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32870c3d57e63e49a84ea7efb4ecbf54d7c488afc4ae85787494b427f1e78520
|
|
| MD5 |
6928a00357751c635808e7477c7b7a90
|
|
| BLAKE2b-256 |
907df2df723cb4b7c6d2f24954fbcf12b4d808ca218ad0dd540b4ed3953732af
|