/Language_model_interface

Spring break project for easier access to 'ollama' language models.

Primary LanguagePythonMIT LicenseMIT

Advanced Interactive Chat Interface with Ollama Language Models

Overview

This advanced Python project develops a chat interface, enabling dynamic interaction with a variety of Ollama language models through a user-friendly, dark-themed GUI built using tkinter. Designed for flexibility and ease of use, it allows users to query different language models in real-time, offering functionalities to manage and document conversations effectively.

Key Features

  1. Comprehensive Language Model Support: Engage with a diverse array of models including llama2, mistral, llama2:13b, llama2-uncensored, llava, codellama:34b, deepseek-coder:33b, sqlcoder, each accessible via specific commands like ollama run <model_name>.
  2. Real-Time Chat Interaction: Utilizes threading for asynchronous communication, ensuring a smooth and responsive user experience.
  3. Enhanced GUI Customization: Features a customizable dark mode interface, designed to minimize eye strain and improve text readability.
  4. Conversation Flow Control: Offers detailed control over chat interactions, including options to start, stop, clear, and save conversations as markdown files for easy sharing and reviewing.
  5. Dynamic Input Adjustment: Implements an adaptive text entry box that adjusts its size based on the user's input, enhancing overall usability.

Installation and Setup

Prerequisites:

Ensure Python 3.x is installed on your system. Recommended RAM: min. 16GB and a decent GPU.

Install Ollama:

Before running the chat interface, install the ollama library using pip:

pip install ollama

When installed, open ollama and run

run llama2
run mistral
run llama2:13b
run llama2-uncensored
run codellama:34b
run deepseek-coder:33b
run llava

Clone the Repository:

Download the project files to your local machine.

Launch the Application:

Run the Python script to start the chat interface. Choose your desired language model from the dropdown menu and begin interacting.

This extensive project is a testament to the power of modern language models and the flexibility of Python's tkinter for creating custom GUI applications. It stands as an invaluable tool for developers and enthusiasts alike to explore the potential of AI-driven communication.