Hosted webapp: https://db2chat.streamlit.app/
You will need a free Groq or a paid OpenAI API key to execute queries.
There are 3 default databases loaded in the webapp:
- Input your Groq/OpenAI API key and select a model (mistral-8x7b, gpt-4, llama3-8b, gemma-7b-it)
- Load your sqlite3 db file (optional)
- Select a database to chat with (default is chinook) + click 'Connect'
You can view your db's schema:
- Enter a query, run and get your chart
You can see the executed SQL query by hovering the (?)
I wanted the app to be less dependant on outside/hosted services. With sqlite3's file databases (size is small as well), the concept of talking with a database can be easily demonstrated
- The model might generate special characters when calling variables/tables. For troubleshooting, the returned error includes the problematic SQL query
- Using general-purpose off-the-shelf models