Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Web UI for Ollama built in Java with Vaadin, Spring Boot and Ollama4j

License

NotificationsYou must be signed in to change notification settings

ollama4j/ollama4j-web-ui

Repository files navigation

A web UI forOllama written in JavausingSpring Boot andVaadin frameworkandOllama4j.

The goal of the project is to enable Ollama users coming from Java and Spring background to have a fully functional webUI.

This project focuses on the raw capabilities of interacting with various models running on Ollama servers.

Table of Contents

How does it work?

  flowchart LR    owui[Ollama4j Web UI]    o4j[Ollama4j]    o[Ollama Server]    owui -->|uses| o4j    o4j -->|Communicates with| o;    m[Models]    subgraph Ollama Deployment        direction TB        o -->|Manages| m    end
Loading

Requirements

Java

Running the application

Via Docker

If you already have a Ollama service running, the easiest way to get started is by using Docker by pointing to the hostaddress of Ollama. Find the image tagshere.

Run the Docker container by issuing this in your terminal:

docker run -it \  -p 9090:8080 \  -e OLLAMA_HOST_ADDR='http://192.168.10.1:11434' \  amithkoujalgi/ollama4j-web-ui

Via Docker Compose

If you want to start the Ollama service and the Ollama Web UI as Docker containers, create afile calleddocker-compose.yaml and add the following contents in it:

services:ollama:image:ollama/ollamaports:      -"11434:11434"volumes:      -~/ollama:/root/.ollamashm_size:512mbollama4j-web-ui:image:amithkoujalgi/ollama4j-web-uiports:      -"9090:8080"environment:OLLAMA_HOST_ADDR:'http://ollama:11434'

Then open up your terminal and then type in:

docker-compose -f /path/to/your/docker-compose.yaml up

And then you access the Ollama4j Web UI onhttp://localhost:9090.

As a standalone JAR

Download the latest version fromhere.

Or, you could download it via command-line.Just make sure to specify the version you want to download.

VERSION=0.0.1; wget https://github.com/ollama4j/ollama4j-web-ui/releases/download/$VERSION/ollama4j-web-ui-$VERSION.jar

Configure

Set environment variables.

export SERVER_PORT=8080export OLLAMA_HOST_ADDR=http://localhost:11434

Or, if you would want to override the base config file, create a fileapplication.properties and add the followingconfiguration.Update the values ofserver.port andollama.url according to your needs.

server.port=8080logging.level.org.atmosphere = warnspring.mustache.check-template-location =falsespring.servlet.multipart.max-file-size=50MBspring.servlet.multipart.max-request-size=50MBvaadin.launch-browser=truevaadin.whitelisted-packages = com.vaadin,org.vaadin,dev.hilla,io.github.ollama4jollama.url=http://localhost:11434ollama.request-timeout-seconds=120

Run the app

java -jar ollama4j-web-ui-$VERSION.jar \  --spring.config.location=/path/to/your/application.properties

Then openhttp://localhost:8080 in your browser to access the Ollama4j Web UI.

Screenshots

ChatImage ChatDownloaded ModelsModels from Ollama

Improvements

  • Show errors on the UI. For example,io.github.ollama4j.exceptions.OllamaBaseException: model "llama3" not found, try pulling it first.
  • Settings pane for configuring default params such astop-p,top-k, etc.

Get Involved

Contributions are most welcome! Whether it's reporting a bug, proposing an enhancement, or helpingwith code - any sortof contribution is much appreciated.

Credits

The project is inspired by the awesomeollama4j-ui projectby@AgentSchmecker.

The nomenclature has been adopted from the incredibleOllamaproject.

Thanks to the amazing contributors

About

Web UI for Ollama built in Java with Vaadin, Spring Boot and Ollama4j

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors3

  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp