RAG for the SITS R Package documentation
To run the sitsrag, you need to have Python 3.11+ and uv installed. Then, to install it, first clone the repository:
git clone https://github.com/m3nin0-labs/sitsrag.gitThen, access the repository downloaded:
cd sitsragFinally, you can sync the dependencies:
uv sync
Before running the sitsrag, you need to configure the anthropic and cohere keys. For this, first copy the .env.example file:
cp .env.example .env
Then, you set the variables in the file:
ANTHROPIC_API_KEY=sk-ant-...
RERANKER_API_KEY=cohere_...
It is possible to configure other parameters. You can check all of them in the .env.example file.
To start using sitsrag, you first need to create the database (SQLite) for it:
sitsrag db migrateNext, prepare domain knowledge data used as auxiliary resources during search:
# Domain knowledge (satellites, indices, sits collections)
sitsrag ontology load all
sitsrag ontology linkThen, you can index the sits materials:
sitsrag index documentation
sitsrag index reference
sitsrag index articlesFinally, you can run the server:
sitsrag serveThe server listens on http://127.0.0.1:8000/ by default.
For production environments, you can run the server behind nginx and gunicorn (multiple workers) via Docker Compose:
docker compose up --buildThe Docker Compose builds an image for the sitsrag, which bakes in the pre-built database and the embedding model. The Compose also stars an nginx, which exposes the server on port 80.
uv sync --extra dev
uv run pytest # run the test suite
uv run ruff check . # lintContributions are welcome. Please open an issue to discuss significant changes, and ensure tests, linting and type checks pass before submitting a pull request.
sitsrag is distributed under the GPL-v3.0 license. See LICENSE for the full text.