Skip to content

Development environment

OpenGateLLM is composed of several services:

To simplify development, we have created a make command that allows you to launch the services locally in development mode. Follow the steps below to setup your development environment.

  1. Create a Python virtual environment (recommended)

  2. Install the dependencies

    Terminal window
    pip install ".[api,playground,dev,test]"
  3. Install the pre-commit hooks

    Terminal window
    pre-commit install
  4. Launch services locally

    Start services locally with the following command:

    Terminal window
    make dev

    The API will be available at http://localhost:8000 and the playground at http://localhost:8501.

  5. Create the API key for the admin user

    The default created user will be admin as email and its password changeme.

    Open another terminal and create a new API key with the following command:

    Terminal window
    make create-api-key
  6. Setup your models

    To add your models, you can refer to the documentation to setup your models.

Please respect the following convention for your commits:

[doc|feat|fix](theme) commit object (in english)
# example
feat(collections): collection name retriever

The project linter is Ruff. The specific project formatting rules are in the pyproject.toml file.

Please install the pre-commit hooks to run the linter at each commit:

Terminal window
pre-commit install

To run the linter manually:

Terminal window
make lint