A simple and colourful command-line interface for interacting with the OpenAI API. The application uses SQLite for persistent storage of chat threads and Rich for beautiful output.
Converts Markdown into colourful text and supports syntax highlighting using the excellent Rich Python library (https://github.com/Textualize/rich).
Currently tested on MacOS only!
- Easy-to-use interface for chatting with OpenAI models
- Thread management with timestamps
- Error handling for connection issues
- Polite goodbye message at the end of the session!
- Clone the repository
- Install the required dependencies using
pip install -r requirements.txt - Set up your URL and OpenAI API key in the
.envfile e.g. LM Studio BASE_URL=http://localhost:1234/v1
- Run the script using
python chitchat.py - Follow the prompts to interact with the OpenAI models
/new <thread_name>: Start a new conversation thread/list: List all conversation threads/load <thread_id>: Load a specific conversation thread/delete <thread_id>: Delete a specific conversation thread/quit: Exit the program/help or /?: To list these command options
BASE_URL: The base API URL (default: http://localhost:1234/v1)MODEL_NAME: The model to use (i.e. google/gemma-3-1b)API_KEY: (default: lm-studio)MODEL_TEMP: The model temperature (default: 0.8)
For any changes, please open an issue first to discuss what you would like to change.