A simple natural language interface to query your SQLite inventory database using OpenAI's GPT model.
- Create a virtual environment and activate it:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Create a
.envfile in the project root with your OpenAI API key:
OPENAI_API_KEY=your_api_key_here
- Place your SQLite database file at
data/retailware.db
Run the application:
python main.pyYou can now ask questions about your inventory in natural language. For example:
- "How many products are in the database?"
- "What are the top 5 most expensive products?"
- "Show me all products with stock less than 10"
Type 'exit', 'quit', 'bye', or 'stop' to end the session.
- Python 3.8+
- OpenAI API key
- SQLite database file