Open-source bot platform based on Large Language Models
Warning: This project is currently in alpha stage and may be subject to major changes
https://github.com/TheLion-ai/Chattum/assets/12778421/93dbf48e-9f03-47ed-9a0b-ac9899fedb3a
To run this project, you will need to add the following environment variables to your .env
file
MONGODB_URL = mongodb://<mongo_username>:<mongo_pass>@mongo:27017 #based on following
MONGO_INITDB_ROOT_PASSWORD = <mongo_username> #choose anything
MONGO_INITDB_ROOT_USERNAME = <mongo_pass> #choose anything
S3_ENDPOINT = 'http://minio:9000'
S3_BUCKET = <bucket_name> #choose anything e.g "chattum"
S3_ACCESS_KEY = <s3_access_key> #choose anything
S3_SECRET_KEY= <s3_access_key> #choose anything
OPENAI_API_KEY = <your_api_key> #for embeddings
API_KEY = <api_key> "choose anything, used for API protection"
Run the app using docker-compose
docker-compose --env-file .env --profile standalone up
To visit the FastAPI documentation of the resulting service, visithttp://localhost:8000/docs
with a web browser.
To access the UI, visit http://localhost:8501
.
Logs can be inspected via:
docker-compose logs
set your connection string in the env .env
file
MONGODB_URL = <your_mongo_uri>
You can skip
MONGO_INITDB_ROOT_PASSWORD
and MONGO_INITDB_ROOT_USERNAME
as those variables are only important for mongo container that we will not hese
Run the app using docker-compose
docker-compose --env-file .env --profile minio up
set your s3 creditionals string in the .env
file
S3_ENDPOINT = <s3_endpoint> #your s3 endpoint
S3_BUCKET = <bucket_name> # your bucket name
S3_ACCESS_KEY = <s3_access_key> #your access key id
S3_SECRET_KEY= <s3_access_key> #your secret access key
Run the app using docker-compose
docker-compose --env-file .env --profile mongo up
Set your env variables for both s3 and mongo as described above
Run the app using docker-compose
docker-compose --env-file .env up
Contributions are always welcome!
Install pre-commits https://pre-commit.com/#installation
If you are using VS-code install the extention https://marketplace.visualstudio.com/items?itemName=MarkLarah.pre-commit-vscode
To make a dry-run of the pre-commits to see if your code passes run
pre-commit run --all-files
Dependencies are handeled by poetry
framework, to add new dependency run
poetry add <package_name>
inside the /frontend
or /backend
directory
To modify and debug the app, development in containers can be useful .
run_tests.sh
Modify the BACKEND_URL
variable in constants.py
to localhost:5000
cd frontend
poetry install
poetry run poetry run streamlit run ui.py
cd backend
poetry install
poetry poetry run uvicorn api:app --host 0.0.0.0 --port 5000 --reload