<root>
├── scripts # Scripts for testing, deployment, ...
├── src
│ ├── apps # User-facing apps
│ ├── libs # Common utility functions
├── Dockerfile # Container image
├── pyproject.toml
Run the followings
# Install poetry (Mac) or follow https://python-poetry.org/docs/ (others)
brew install poetry
# Enter new virtual env using poetry
poetry shell
# Install packages and update
poetry install
poetry update
# Verify installation
poetry show fastapi
- Install pre-commit using
brew install pre-commit
for Mac or follow https://pre-commit.com/#install for other systems - Run
pre-commit install
shell - Test by running
pre-commit run --all-files
- Copy .env.template to a new file named
.env
(to be used for local development, do not commit to repo) and update the API Keys and Settings - Run
PYTHONPATH=src python -m uvicorn apps.fastapi_chainlit_app:app --host 0.0.0.0 --reload
The app works without login by default, to enable it add this to .env
ENABLE_PASSWORD_AUTH=true
CHAINLIT_PWD_USERS=user1:passwordHash1
where passwordHash
is generated by python src/libs/cryptography_helper.py