Skip to content

tomteipl/Ollama-GUI-Chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

51 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Ollama-GUI-Chat

OGC default colors photo

GitHub License GitHub commit activity GitHub Issues or Pull Requests GitHub Release Static Badge Python

OGC (Ollama-GUI-Chat) is a simple chat app that uses Ollama AI models installed on your hardware. You can use models predefined in the dropdown menu or simply type your custom model name in the window. The app is written in Python using modules like customtkinter, tkinter, requests, and json.

OGC sends a payload to your local server with the Ollama model. By default, it's http://localhost:11434/api/chat. You can enter custom URL, when you open the app there is inserted default URL.

Table of Contents

πŸ”₯ Features

  • ✏️ Talk with LLM AI models with style using light GUI app.
  • πŸ“‚ Auto detect your models from Host URL.
  • 🌟 settings.ini, saves selected theme, URl and light/dark mode.
  • πŸ”– Save, load and Clear chat.
  • 🍻 Switch themes with a simple button.
  • πŸŒ“ Light and Dark modes.
  • πŸ—½ Toggle autoscroll.
  • 🌹 Most important, customize the style of the whole app with a simple JSON file !
  • 🎁 Its free and open-source. Use the source code to customize the app even more !
  • And more in development...

πŸ‘· Installation

Important

You are required to have installed Ollama. Please refer to the official website for installation instructions.

TL;DR:

  • Download the latest release.
  • Extract the archive.
  • Enjoy!

Usage

Important

On the first message, the app may take a while to respond due to setting up a server.

When you launch the app for the first time, it will create settings.ini (also after you manually remove it). By default it will look like this:

[Settings]
theme = default.json
host = http://localhost:11434
appearance = light
  • [theme] = ..., this value will change depending on the theme picked from the Change theme button.

NEW FEATURE: In theme selection window, now you have a new dropdown menu that shows your custom themes.

Change Theme 2

Or:

You can add your own theme files and type its json file name. Theme has to be placed in _internal/theme/ folder.

  • [host] = ..., this value is used for fetching your LLM models. It is automatically inserted into the host_url entry field. You can change it in the settings.ini file or by typing a new URL into the entry field and hitting the "Enter" key. This will fetch new models and save them to settings.

  • [appearance] = light or dark, which simply saves the dark mode preference, so you don't have to change it each time you open the app.

Saving and loading

If you wish, you can save whole conversation by pressing a Save button. It will open a save window, select any location, name and save it as .txt file.

Loading a chat is no harder. Press Load button and select .txt file that you created earlier. You will not get any prompt. I usually type What was my first message? and it responds according to the file that i loaded.

Tip

The AI doesn't recognize from what LLM the chat was, so you can load for example a conversation from llama3.1 into gemma3.

Other features

  • Autoscroll checkbox - whenever you want to hold the page and read, uncheck the box. If you check it again it will move you to the last generating line.

  • Font size - You can increase/decrease the chat font by pressing red arrows. This value is not being saved in settings.ini.

  • Clear chat - like the name says it clears the chat window and Clears the conversation history so the AI will not remember this conversation.

  • Stop button: Whenever the AI is generating a response, the stop button will pop up alongside the progress bar. When you hit it, of course it will stop the conversation, but also it will remove your last question from the history.

πŸ’» Customization

OGC default colors photo

You can customize the style of the app by editing *.json. Or by adding your own theme files. OGC searches for the json file in the _internal/theme/ folder.

Part of the default.json file:

{
  "CTk": {
    "fg_color": ["#5c549f", "#000"]
  },
  "CTkButton": {
    "corner_radius": 6,
    "border_width": 1,
    "fg_color": ["#978dfd", "#191a19"],
    "hover_color": ["#6f68bd", "#4b4d4b"],
    "border_color": ["#3a3666", "#02b508"],
    "text_color": ["#FFFFFF", "#00ff04"],
    "text_color_disabled": ["gray74", "gray60"]
  },
  "CTkLabel": {
    "corner_radius": 0,
    "fg_color": "transparent",
    "text_color": ["#FFFFFF", "#00ff04"]

Tip

Colors on the left are for Light theme, and on the right for Dark theme.

Its pretty easy and self-explanatory. Just change the values and see the changes in the app. You can use HEX colors or names like "green".

Some of the values are hard coded and json file has no impact on them.

Detailed usage of theme file can be found on the official CustomTkinter page.

🎨 Themes (WIP)

You can find more themes in themes folder. Each theme has light and dark mode.

Note

Gruvbox.json, Tokyo-Night.json and default.json themes are included in the release file.

Gruvbox

Gruvbox Theme

Tokyo Night

Tokyo Night Theme

Nordic

Download

Nordic theme

Catppuccin-mocha

Download

Catppuccin-mocha

Solarized-Osaka

Download

Solarized-Osaka

License

This project is under the GPL-3.0 license.

About

Simple Ollama GUI app written in Python. Everything you need for your LLM.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Languages