From the course: Building Agents Using the Azure AI Foundry Agent Service
Unlock this course with a free trial
Join today to access over 24,800 courses taught by industry experts.
Deploying with Chainlit
From the course: Building Agents Using the Azure AI Foundry Agent Service
Deploying with Chainlit
- [Narrator] Chainlit is an open source Python package to build production-ready conversational AI applications. We can use Chainlit to allow users to run and access our agents. We can easily set up Chainlit using this Chainlit documentation. I created a new folder called chainlit to store all our Chainlit code. We first need to install Chainlit via pip. We then run chainlit hello to see that installation ran smoothly. It would spawn the Chainlit UI and ask for our name. Heading over to the Chainlit documentation, we would need to create a Python file called app.py to contain our application code. We would copy this code snippet, and we would paste it in our application file. We then run the Python file using the command chainlit run app.py -w. The sample application just echoes back our message. There are some basic concepts about Chainlit that we need to know. Whenever a user connects to our Chainlit app, a new chat session is created. A chat session goes through a lifecycle of…