This project implements a chatbot that utilizes AI focused on SQL. Users can ask questions in natural language, and the chatbot retrieves results from the database. It uses LangChain4J to simplify connections to the Ollama server, utilizing downloaded duckdb-nsql models.
- Option to select any local database.
- Option to choose language models downloaded on your machine through Ollama.
- GUI designed for ease of use.
- Tested in two languages: English and Portuguese (BR)
Screenshot of the main interface.
Screenshot demonstrating the functionality.
Screenshot demonstrating the functionality.
- Java
- Ollama
- LangChain4J
- MySQL
- Java Swing (for the GUI)
- Model llm: duckdb-nsql:7b
- Java Development Kit (JDK)
- Any database (in this case, MySQL)
- Ollama API installed and configured
- Duckdb-nsql language models available
- Clone the repository:
git clone https://github.com/username/sql-chatbot.git
- Set up project dependencies with Maven.
- To connect your database, create and set up
resources/config.properties (url, user, password). - Run the
Mainclass to start the chatbot.



