Updating Chainlit

Begin the migration by updating Chainlit to the latest version:

pip install --upgrade chainlit

Then remove your .chainlit/config.toml file and regenerate it:

chainlit init

Several fields disappeared from the config, such as project_id, public and database.

Authentication

Previously, authentication was completely tied to Chainlit Cloud and not customizable by the developers. The new system enables developer to quickly implement:

  • login/password authentication
  • OAuth authentication
  • Header based authentication for apps running with a reverse proxy.

Check the documentation to learn more about it.

Data Persistence

Previously Chainlit was allowing for different database mode (cloud, local and custom). We found that it was confusing for developers and that some modes were heavily misused (like local db in production).

The new system is much simpler. You can create an API key on Chainlit Cloud. Then set it in your .env and you are good to go.

We understand that data privacy is a concern for companies, that’s why we made Chainlit Cloud self hostable.

Check the documentation to learn more about it.

Chainlit Cloud

To facilitate the self hosting of Chainlit Cloud, we had to drop third party vendors. If you used to sign in with OAuth, everything should work out of the box.

If you used to sign in with password, click on Forgot password? and follow the process. You will be prompted to reset your password and verify your email.

Removed APIs

The following APIs have been removed:

  • @cl.auth_client (see new authentication)
  • @cl.db_client (see new data persistence)

Resources

The documentation, examples, and cookbook have been updated to reflect the new APIs. If you have any questions, don’t hesitate to reach out on our Discord server.