/Data-Dialogue

Natural language chat interface to analyze your data from PostgreSQL, MySQL, MSSQL, or CSV — powered by local LLMs via Ollama.

Primary LanguagePythonMIT LicenseMIT

💬 Chat to Analytics

Chat to Analytics is a Streamlit-based app that allows users to query data from multiple sources (PostgreSQL, MySQL, MSSQL, or CSV) using natural language powered by LLMs (Ollama).

🚀 Features

  • 🔌 Connect to PostgreSQL, MySQL, MSSQL or upload a CSV
  • 💬 Ask data questions in plain English
  • 📄 View the generated SQL
  • 📊 Visualize results instantly
  • 💾 Chat history is stored locally in chat_history.json
  • 🧠 LLM Provider: Ollama with local model support
  • 🌙 Optional Dark Mode toggle
  • 🗂️ Tabbed interface (Chat | SQL | Visuals)

🧰 Requirements

pip install -r requirements.txt

You also need to install Ollama locally and pull a model (e.g., mistral, qwen, llama3):

ollama pull mistral

💡 How It Works

  1. Connect a Data Source
    • Use PostgreSQL, MySQL, MSSQL, or CSV upload.
  2. Ask a Question
    • Your question is sent to an LLM to generate SQL.
  3. Run & Visualize
    • The SQL is run on the selected data source.
    • Results are shown in table and chart format.

🛠️ Development

To run locally:

streamlit run ui/app.py

Directory Structure

📁 agents/
   └── sql_generator.py
📁 data_connectors/
   ├── connectors.py
   └── schema_inspector.py
📁 ui/
   └── app.py

📄 License

MIT License © 2025 Praneeth Bollina


🙋 Support

Found a bug or need help? Raise an issue or reach out directly!