Skip to content

Repository files navigation

OpenGateRAG

Version Coverage License Stars

Developer mode (local API)

  • Install dependencies

    pip install .
  • Configure and export environment variables

    cp .env.example .env # update variables after copy
    export $(cat .env | grep -v ^# | xargs)

    [!NOTE] The database setup by OPENGATELLM_DATABASE_URL environment variable must be the same as the database used by the API specified in OPENGATELLM_URL environment variable.

  • Lauch database dependencies

    docker compose --file compose.example.yml up --wait --detach postgres elasticsearch
  • Instantiate database

    alembic -c opengaterag/api/alembic.ini upgrade head
  • Run API locally

    uvicorn opengaterag.api.app:app --reload

Run tests

  • Install dependencies

    pip install ".[test]"
  • Run tests

    pytest opengaterag/api/tests/unit/

Alembic migrations

  • Run migrations

     alembic -c opengaterag/api/alembic.ini upgrade head
  • Create a new migration

    alembic -c opengaterag/api/alembic.ini revision --autogenerate -m "Add new column to users table"

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages