Skip to content

jimm-uk/chitchat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chitchat - OpenAI API Wrapper

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!

Features

  • 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!

Installation

  1. Clone the repository
  2. Install the required dependencies using pip install -r requirements.txt
  3. Set up your URL and OpenAI API key in the .env file e.g. LM Studio BASE_URL=http://localhost:1234/v1

Usage

  1. Run the script using python chitchat.py
  2. Follow the prompts to interact with the OpenAI models

Commands

  • /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

Configuration (.env file)

  • 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)

Contributing

For any changes, please open an issue first to discuss what you would like to change.

License

MIT

About

A simple and colourful command-line interface for interacting with the OpenAI API. Python/MacOS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages