8000 GitHub - TheLion-ai/Chattum
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

TheLion-ai/Chattum

Repository files navigation

logo

Chattum

Open-source bot platform based on Large Language Models

contributors last update license


🀩 About the Project

Warning: This project is currently in alpha stage and may be subject to major changes

πŸ“· Demo

chattum.1.mov

πŸ‘Ύ Tech Stack

Frontend
Backend
Database
DevOps

🧰 Getting Started

‼️ Prerequisites

  • docker
  • OpenAI api key

Standalone deployment

πŸ”‘ Environment Variables

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"

βš™οΈ Running the aplication

Run the app using docker-compose

docker-compose --env-file .env --profile standalone up

To visit the FastAPI documentation of the resulting service, visit http://localhost:8000/docs with a web browser.

To access the UI, visit http://localhost:8501.

Logs can be inspected via:

docker-compose logs

Using external mongo datastabse

πŸ”‘ Environment Variables

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_USERNAMEas those variables are only important for mongo container that we will not hese

βš™οΈ Running the aplication

Run the app using docker-compose

docker-compose --env-file .env --profile minio up

Using external s3 compatible service

πŸ”‘ Environment Variables

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

βš™οΈ Running the aplication

Run the app using docker-compose

docker-compose --env-file .env --profile mongo up

Using both exteral mongo database and s3 service

πŸ”‘ Environment Variables

Set your env variables for both s3 and mongo as described above

βš™οΈ Running the aplication

Run the app using docker-compose

docker-compose --env-file .env up

🧭 Roadmap

  • Sources
  • Chat
  • Conversation browsing
  • Dynamic APIs
  • Tools
  • Users management
  • Variables in prompts
  • Embedd chat on website
  • Custom language models

πŸ‘‹ Contributors

Contributions are always welcome!

🀝 Contact

Aleksander Obuchowski

TheLion.AI

Development

Pre-commits

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

Adding python packages

Dependencies are handeled by poetry framework, to add new dependency run

poetry add <package_name>

inside the /frontend or /backend directory

Debugging

To modify and debug the app, development in containers can be useful .

Testing

run_tests.sh

Running the aplication without docker

Frontend

Modify the BACKEND_URL variable in constants.py to localhost:5000

cd frontend

poetry install

poetry run poetry run streamlit run ui.py

Backend

cd backend

poetry install

poetry poetry run uvicorn api:app --host 0.0.0.0 --port 5000 --reload

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  
0