Skip to content

OpenSilver/OllamaManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ollama Manager

A web-based Ollama model management application developed with OpenSilver.

This project also includes a WPF desktop version migrated from the OpenSilver version, allowing developers to compare and learn from the development experience across both platforms.

Table of Contents

Screenshots

Manage Ollama models easily with an intuitive interface and chat with them in real-time.

Main Interface Chat Interface
Main Interface Chat Interface

Key Features

  • View installed model list
  • Start/stop models
  • Real-time chat
  • Model status monitoring

Project Structure

src/
├── client-opensilver/    # OpenSilver web client
├── client-wpf/          # WPF desktop client
└── server-minimalapi/   # Shared backend server

Tech Stack

  • Web Client: OpenSilver (.NET Standard 2.0)
  • Desktop Client: WPF (.NET 9.0)
  • Backend: ASP.NET Core Minimal API (.NET 9.0)
  • Real-time Communication: SignalR

Server Architecture

Minimal API Structure

  • GET /api/models - Retrieve installed models list and status
  • POST /api/models/{modelName}/start - Start model
  • POST /api/models/{modelName}/stop - Stop model
  • POST /api/chat - Chat with model

Ollama API Integration

The backend server manages models using the Ollama API:

  • http://localhost:11434/api/tags - Installed models list
  • http://localhost:11434/api/ps - Check running models
  • http://localhost:11434/api/generate - Model load/unload and chat

Real-time Monitoring

  • Real-time model status updates via SignalR Hub
  • Background service for detecting model status changes

Getting Started

Prerequisites

  • Ollama: Install from ollama.com
  • Model Installation: Example: run ollama pull llama3.2
  • Visual Studio 2022
  • .NET 9.0 SDK
  • WASM Tools: dotnet workload install wasm-tools
  • OpenSilver SDK: Download OpenSilver_SDK_v3.2.0.4.vsix from www.opensilver.net and install

Server Execution

First, run the backend server:

cd src/server-minimalapi/LocalLLMServer
dotnet run --launch-profile https

The server will run at https://localhost:7262.

OpenSilver Web Client

cd src/client-opensilver/OllamaHub.Browser
dotnet run

Access via browser at http://localhost:55592

WPF Version

You can also run the WPF version using the same server:

cd src/client-wpf/OllamaHub
dotnet run

Development Roadmap

Currently Implemented

  • Model list retrieval
  • Model control (start/stop)
  • Real-time chat

Planned Features

  • Model downloads
  • Model deletion
  • Multi-session chat
  • Performance monitoring

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Create a Pull Request

License

MIT License

Notes

  • This is an excellent example for verifying code compatibility between WPF and OpenSilver
  • OpenSilver is based on .NET Standard 2.0 and provides a WPF-like development experience on the web

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •