This example demonstrates how to create a simple chatbot using Quivr and Chainlit. The chatbot allows users to upload a text file and then ask questions about its content.
Clone the repository and navigate to the examples/chatbot
directory.
Install the requirements using rye
:
Activate the venv:
Define your API key as environment variable:
Start the Chainlit server:
Open your web browser and go to http://localhost:8000
.
The chatbot uses Quivr to create a “brain” from the uploaded text file. This brain is then used to answer questions about the file’s content. The Chainlit library provides the user interface and handles the chat interactions.
For the complete example code, visit our GitHub repository.