Skip to main content

Updating Chainlit

Begin the migration by updating Chainlit to the latest version:
pip install --upgrade chainlit

What changes?

Chainlit 2.1.0 introduces Commands — a way to capture user intent in a deterministic way. Users can select a command before sending a message, and the selected command is persisted alongside the message in the steps table. Full changelog available here.

How to migrate?

1. Update the database schema

A new command column must be added to the steps table so that the selected command can be persisted with each message.
The Official data layer Prisma schema has not been updated to include this column. Run the following migration manually against your database:
ALTER TABLE "Step" ADD COLUMN IF NOT EXISTS "command" TEXT;
DynamoDB users do not need to run any migration — the schema is dynamic.