Skip to content

A modern graphical chatbot powered by LLMs (OpenAI), built with PyQt6. Paste any CSV or table, ask data questions in natural language, and get instant answers in a beautiful desktop interface.

Notifications You must be signed in to change notification settings

gbazad93/llm-graphical-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI-Powered Data Chatbot (PyQt6 + OpenAI LLM)

A visually modern, creative desktop demo app (by Bobby Azad) showing how LLMs can make data analysis conversational. Users paste or load CSV/TSV/tabular data, ask natural language questions ("Convert this to JSON", "Find the correlation between x and y column", etc), and get instant answers via OpenAI API. Built with PyQt6 for an interactive, professional UI.


Features

  • Paste or load any CSV/TSV/text data (from file or clipboard)
  • Clean chat interface: ask any data question and get an AI-powered response
  • Conversation history maintained in a modern, resizable UI
  • Supports code/text output (JSON, summaries, stats, etc)
  • UI and logic cleanly separated; robust error handling

Quick Start (using pixi for environment management)

1. Install pixi (if you haven’t already)

pip install pixi  # or see pixi docs for latest install command

2. Clone this repo

git clone https://github.com/gbazad93/llm-graphical-chatbot
cd <your-repo-folder>

3. Set up the pixi environment

If you already have a pixi.toml file (shared or in this repo):

pixi install

This will create a new environment with all required dependencies (see pixi.toml).

4. Set your OpenAI API key

You can store your API key in a .env file in the project root (where the main .py file is):

OPENAI_API_KEY=sk-...your-openai-api-key...

However, for improved security, we recommend storing your API key as a system environment variable.

On Windows:
Open a command prompt window and run:

setx OPENAI_API_KEY "<your-openai-api-key>"

To verify it's set, open a new command prompt and run:

echo %OPENAI_API_KEY%

On Linux or macOS:
Add the following line to your ~/.bashrc, ~/.zshrc, or appropriate shell config file:

export OPENAI_API_KEY="sk-...your-openai-api-key..."

Then reload your shell or run:

source ~/.bashrc  # or source ~/.zshrc

You can check the variable with:

echo $OPENAI_API_KEY

5. Run the app

pixi run python main.py

Dependencies

(Handled automatically by pixi install)


Example Usage

  • Paste or load a CSV file into the left panel.
  • Type a question like What is the correlation between Price and Sales?.
  • Click Send. The AI will analyze the data and show the result in the chat window.

Screenshots

screenshot1


Customization

  • Update MODEL in the code to use a different OpenAI model if desired.
  • All UI colors/styles are defined in styles.py method in the code for easy theming.

Credits

About

A modern graphical chatbot powered by LLMs (OpenAI), built with PyQt6. Paste any CSV or table, ask data questions in natural language, and get instant answers in a beautiful desktop interface.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages