The is an example chatbot built with Chainlit and LangChain to demostrate the capability of Text-to-SQL using OpenAI's LLM. The chatbot is connected to a postgres database with the Brazilian E-Commerce Public Dataset. You can try it here: sql-chatbot.fly.dev
- Chainlit: Chainlit Documentation 📚
- LangChain: LangChain Documentation 📚
- Data Source: Brazilian E-Commerce Public Dataset by Olist
To run the application locally, make sure you have set the environment variable OPENAI_API_KEY
or set it in the docker-compose
file, then simply run:
docker compose up --build
This starts the postgres
container, loads the Brazilian E-Commerce Public Dataset
into the database, and starts the Chatbot application container. You could visit the chatbot at
http://localhost:8000