Skip to content

wyznel/Liberty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Important

Liberty is still in early development, expect lots of issues!

Liberty

Liberty is a lightweight, JavaFX-based desktop chat application for interacting with local LLMs via Ollama. It aims to provides a clean, modern interface with a smooth typing effect and built-in conversation management.

Features

  • Interactive UI: A simple and responsive chat interface built with JavaFX.
  • Smooth AI Typing: Experience AI responses with a natural, smooth typing animation.
  • Ollama Integration: Automatically manages Ollama server startup and model pulling.
  • Tool Calling (Beta): Liberty can now perform actions on your file system and extract data:
    • File Handling: Create, read, write, append, and list files.
    • PDF Text Extraction: Extract text content from PDF documents.
  • Conversation Management: Save and load your chat histories to/from JSON files.
  • Slash Commands: Use intuitive commands directly in the chat input:
    • /help: Display available commands.
    • /save <filename>: Save current conversation history.
    • /load <filename>: Load a previous conversation history.
    • /clear: Clear the chat window.
    • /exit: Close the application.
  • Model Support: Defaulted to use qwen3:4b-instruct, optimized for chat and tool-calling tasks.

Prerequisites

  • Java: JDK 24 or higher is required.
  • Ollama: Ensure Ollama is installed and the ollama command is accessible in your system's PATH.
  • Maven: For building and running the project.

Getting Started

1. Build and Run

Use the Maven Wrapper to build and run the application:

./mvnw clean javafx:run

The application will check if the Ollama server is running and ensure the required model is pulled before starting the chat interface.

Configuration

Available models are listed in OllamaChatService.java. You can change the default model by modifying the AVAILABLE_MODELS array and the model selection index:

private final static String[] AVAILABLE_MODELS = {
        "gemma4:e4b", "qwen2.5:7b-instruct",
        "qwen3.5:4b", "qwen3:4b-instruct",
        "gemma4:e2b"
};
private final OllamaChatRequest builder = OllamaChatRequest.builder().withModel(AVAILABLE_MODELS[3]);

Dependencies

  • JavaFX 21: Controls and FXML.
  • ollama4j: For communication with the Ollama API and tool-calling support.
  • Apache PDFBox: For PDF text extraction.
  • Jackson Databind: For JSON processing and conversation history.
  • JUnit 5: For unit testing.

License

This project is licensed under the APACHE-2.0 License - see the LICENSE file for details.

About

Liberty is a JavaFX app for chatting with self hosted LLM's via Ollama.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors