This project is a reverse-engineered version of Chainlit's cloud, offering limited functionality. It focuses on enabling the saving of conversations, messages, and adding new users to a Chainlit-like application without using chainlit's cloud.
- Python 3.x
- pip (Python package manager)
- Git
-
Clone the Repository
Clone the project repository to your local machine.
git clone https://github.com/nickandbro/chainlit_backend_implementation cd chainlit_backend_implementation
-
Set Up a Virtual Environment
Create and activate a virtual environment for the project.
python -m venv .venv source .venv/bin/activate # On macOS/Linux
-
Install Chainlit
If you haven't installed chainlit, install version 0.7.700 as its the last proven version that works
pip install chainlit==0.7.700
-
Install Other Dependencies
Install the required dependencies from the requirements.txt file.
pip install -r requirements.txt
-
Environment Variables Set the following environment variables for your chainlit client:
CHAINLIT_AUTH_SECRET="EMPTY" CHAINLIT_API_KEY="your key" CHAINLIT_SERVER="http://127.0.0.1:5000"
-
Run the Server
To run the server, use the following command:
uvicorn main:app --port 5000
Add --host 0.0.0.0 if you want to host publicly
1. Currently limited to just saving/retrieving/deleting conversations and creating/gettings users
2. Relies on version 0.7.700 for compatibility. Most likely chainlit 1.0.0 is going to use a completely different graphQL schema