Preview of the final result
Prerequisites
This example has extra dependencies. You can install them with:Imports
app.py
Define a prompt template and LLM settings
app.py
Add the Assistant Logic
Here, we decorate themain
function with the @on_message decorator to tell Chainlit to run the main
function each time a user sends a message.
Then, we wrap our text to sql logic in a Step.
app.py
Try it out
Compute the number of customers who watched more than 50 minutes of video this month
.