Overview
By default, your Chainlit app does not persist the chats and elements it generates. However, the ability to store and utilize this data can be a crucial part of your project or organization.
Once enabled, data persistence will introduce new features to your application.
Create a Chainlit Project
- Navigate to Chainlit Cloud and sign in.
- Click on the ’+’ icon to create a new project. You will see a screen similar to the one below:
- Click on the ‘Create API Key’ button to create a new API key.
- We will need this key later on.
Activating Data Persistence
After creating a Chainlit Project and an API key for said project. You will need to pass the key via a CHAINLIT_API_KEY
environment variable.
Next to your Chainlit application, create a .env
file and modify it like so:
Or inlined:
Once activated, your chats and elements will be persisted in Chainlit Cloud.
Deactivation
If you wish to deactivate data persistence, simply comment out or remove the CHAINLIT_API_KEY
environment variable.
Data privacy & security
We prioritize your data’s privacy and security. We understand how crucial the data fed into Chainlit Cloud is for your business and handle it with utmost care.
Contact us for detailed information: contact@chainlit.io
Was this page helpful?