Minimal OpenAI chatbot using simpleaichat — a lightweight wrapper for conversational AI.
pip install simpleaichat python-dotenvCreate .env file: OPENAI_API_KEY=sk-your-key-here
Usage
python main.py
How It Works
- Loads API key from .env via python-dotenv
- Initializes AIChat instance with OpenAI credentials
- Sends a message and prints the response
Requirements
- Python 3.7+
- OpenAI API key
- simpleaichat
- python-dotenv
Note
This was an early experiment with LLM APIs. The simpleaichat library handles conversation state, retries, and token management behind the scenes — making it simpler than raw OpenAI SDK calls.