This package integrates Rivet backend to Chainlit frontend, using a Rivet Node.js server, a Python client, and a Chainlit app.
Create the root folder of the project (say, RivetChain
), cd
to it, then git clone
the repository:
git clone https://github.com/igor2c/RivetChain.git
@ironclad/rivet-node
requires Node.js 16 or higher.
cd
to the root folder of the project, install the @ironclad/rivet-node
Node.js library using NPM:
npm install @ironclad/rivet-node
cd
to the root folder of the project, install the express
Node.js library using NPM:
npm install express
Create and activate a conda environment:
conda create --name rivetchain_env python=3.11
conda activate rivetchain_env
chainlit
requires python>=3.8
.
In conda environment, install chainlit
via pip as follows:
pip install chainlit
In the root folder of the project, create a .env
file with the following contents:
OPENAI_API_KEY=
LITERAL_API_KEY=
CHAINLIT_AUTH_SECRET=
- OPENAI_API_KEY is generated here: https://platform.openai.com/api-keys
- LITERAL_API_KEY is generated following this: https://docs.chainlit.io/data-persistence/overview
- CHAINLIT_AUTH_SECRET is generate using
chainlit create-secret
cd
to the root folder of the project, and run:
conda activate rivetchain_env
chainlit run app.py -w
The -w flag tells Chainlit to enable auto-reloading, so you don’t need to restart the server every time you make changes to your application. Your chatbot UI should now be accessible at http://localhost:8000.
- RivetChain:
cd
to root folder of the project,git pull origin master
- Rivet:
cd
to root folder of the project (wherepackage.json
is located) andnpm update @ironclad/rivet-node
- Chainlit: In conda environment,
pip install chainlit --upgrade --upgrade-strategy only-if-needed
(font)