Skip to content

Thinkvas/text-sql-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Text-to-SQL Chatbot πŸ’¬ ➑️ πŸ—ƒοΈ

Turn natural language into SQL queries using LLMs (Google Gemini or OpenAI).
Ideal for databases where users don't know SQL but need insights fast!


πŸš€ Features

  • πŸ—£οΈ Ask database questions in plain English
  • πŸ€– Converts text β†’ SQL using LLM
  • πŸ§ͺ Runs the query and shows actual results
  • πŸ›‘οΈ Works with Google Gemini or OpenAI API
  • πŸ› οΈ Easy to configure using .env file

πŸ“¦ Requirements


πŸ› οΈ Setup Instructions

  1. Clone this repository

    git clone https://github.com/Thinkvas/text-sql-chatbot.git
    cd text-sql-chatbot
  2. Install dependencies

    pip install -r requirements.txt
  3. Set your API key

    • Create a .env file using .env.example as template
    • Paste your Gemini or OpenAI key
  4. Run the chatbot

    python app.py

πŸ§ͺ Example

Input:

Show me the total number of users who signed up in July.

Generated SQL:

SELECT COUNT(*) FROM users WHERE signup_date BETWEEN '2024-07-01' AND '2024-07-31';

Result:

Total Users: 253

🧠 Built With


🀝 Contributing

Pull requests are welcome! If you’d like to contribute, feel free to fork and improve.


πŸ“„ License

MIT License β€” free for personal and commercial use.


✨ Author

Made by @Thinkvas πŸš€

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages