TinyChat is a GUI client for modern Language Models built with simplicity in mind. Its minimalistic Python code is designed for straightforward comprehension and adaptability. More features will likely come, but we are going to do our best to keep it simple.
To reduce magic to a minimum, no official API client is used: it's only just post requests and Server-Sent Events handling. The program only depends on requests, sseclient-py and CustomTkinter.
You can talk with all major models from the OpenAI, Anthropic, Mistral, Meta, Google and Cohere cloud APIs:
- OpenAI: GPT-4o, GPT-4 Turbo
- Anthropic: Claude 3.5 Sonnet, Claude 3 Opus
- Mistral: Large, Codestral
- Meta AI: Llama 3.1 8B, 70B, 405B (via TogetherAI)
- Google: Gemini Pro 1.5
- Cohere: Command R
tinychat.mov
- To use the models you will need an API Key from OpenAI / Anthropic / Mistral / Google / Cohere, and Together for the Meta AI models. Follow the links to get started! The keys will be saved in a "tinychat.json" file that by default is created on the same level as the tinychat package / exe file. You can change the SECRETS_FILE_PATH from the settings.py file.
- I chose to use the official Mistral API to explicitly support Mistral's open weights strategy. You should however be able to easily adapt the code in llms.mistral to change the endpoint in case you feel like it.
# Clone repo and enter main folder
git clone https://github.com/pymike00/tinychat.git
cd tinychat
# Create Virtual Environment
python -m venv venv
# Activate Virtual Environment
source venv/bin/activate on Linux / Mac OS
.\venv\Scripts\Activate.ps1 on Windows Powershell
# Install requirements
pip install -r requirements.txt
# Run application
python -m tinychat
# Clone repo and enter main folder
git clone https://github.com/pymike00/tinychat.git
cd tinychat
# Create Virtual Environment
python -m venv venv
# Activate Virtual Environment
source venv/bin/activate on Linux / Mac OS
.\venv\Scripts\Activate.ps1 on Windows Powershell
# Install requirements
pip install -r requirements-build.txt
# Run build commands
pyinstaller build.spec
# You should now have a new tinychat executable file in a newly created dist folder