GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - micode-ai/ngx-open-web-ui-chat: Angular component library for embedding OpenWebUI chat in applications

BranchesTags
Open more actions menu

Latest commit

 

History

34 Commits
34 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
docs
docs
 
 
projects/ngx-open-web-ui-chat
projects/ngx-open-web-ui-chat
 
 
test-app
test-app
 
 
test-static
test-static
 
 
.gitignore
.gitignore
 
 
.npmignore
.npmignore
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 

Repository files navigation

OpenWebUI TypeScript Embedded SDK

License

Modern Angular 20 library for embedding OpenWebUI chat in your applications with full conversation history, markdown support, and Angular 2025 architecture.

🌐 Live Demo

Try the live demo →

Interactive demo showcasing all features:

  • Dynamic configuration
  • Model selection
  • Real-time chat with conversation history
  • Markdown rendering
  • Multi-language support

šŸ“– How to Use the Application

Quick Start Guide

Step 1: Initial Configuration

When you first launch the application, enter your OpenWebUI server details:

Initial Screen

Required:

  1. Host URL - Your OpenWebUI server address (e.g., http://localhost:8080)
  2. API Key - Your API authentication key

Step 2: Load Available Models

Click "Show Models" to fetch the list of AI models from your server:

Models Loaded

Step 3: Select Your Model

Choose an AI model from the dropdown menu:

Model Selected

Step 4: Connect to Chat

Click "Connect Chat" to initialize your chat session:

Chat Connected

Step 5: Start Chatting

Type your message and click "Send" or press Enter:

Typing Message

Features:

  • View all conversations
  • Organize chats into folders
  • Pin important chats
  • Search through history
  • Archive old conversations
  • Export chats (PDF, TXT, JSON)

šŸ“ Notes Management

Create and manage notes with a built-in markdown editor:

Notes Panel

Features:

  • Rich markdown editor
  • Auto-save functionality
  • Search through notes
  • Reference notes in chats
  • Organize with folders

✨ Features

  • šŸš€ Angular 2025 Ready - Zoneless, Signals, Modern file structure
  • šŸ’¬ Conversation History - AI remembers all previous messages
  • šŸ“ Markdown Support - Rich text rendering with ngx-markdown
  • ⚔ Signals & Zoneless - Latest Angular reactive patterns
  • šŸ“” Streaming Responses - Real-time chat with typing indicator
  • ā¹ļø Stop Generation - Cancel AI response at any time
  • šŸŽ¤ Voice Input - Record audio messages with automatic transcription
  • šŸŒ Multi-language - 10 languages supported
  • šŸŽØ Customizable - SCSS with modern features
  • šŸ”§ TypeScript - Full type safety
  • šŸ“± Responsive - Mobile-friendly design
  • ⭐ Response Actions - Continue, regenerate, and rate responses
  • šŸ‘ Rating System - Comprehensive feedback with good/bad ratings
  • šŸ“¤ Chat Export - Download conversations as PDF, TXT, or JSON
  • šŸ›”ļø Safe Deletion - Prevents accidental deletion of active chats
  • šŸ’¬ Ask & Explain - Context menu for selected text with AI explanations
  • šŸ“‚ Folder Support - Organize chats into folders with drag & drop
  • šŸ“ Notes Support - Integrated markdown note editor with sidebar
  • šŸ—ƒļø Archived Chats - View, search, unarchive, and delete archived conversations
  • šŸ”Œ Integrations - Toggle Web Search and Code Interpreter capabilities
  • šŸ› ļø Tools Support - Access and enable server-side tools from Open WebUI API
  • šŸ’¬ Reference Chats - Reference previous conversations in new messages
  • šŸ“ Reference Notes - Reference notes in new messages
  • 🌐 Web Page Attachment - Process and attach web page content to messages
  • šŸŽ›ļø Feature Toggles - Conditional display of advanced features

šŸš€ Quick Start

Installation

npm install ngx-open-web-ui-chat

Setup

1. Configure Bootstrap (main.ts)

import { bootstrapApplication } from '@angular/platform-browser';
import { provideZonelessChangeDetection } from '@angular/core';
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import { provideMarkdown } from 'ngx-markdown';
import { AppComponent } from './app/app.component';

bootstrapApplication(AppComponent, {
  providers: [
    provideZonelessChangeDetection(),  // Zoneless mode!
    provideHttpClient(withInterceptorsFromDi()),
    provideMarkdown()  // For markdown rendering
  ]
}).catch((err) => console.error(err));

2. Use Component

import { Component } from '@angular/core';
import { OpenwebuiChatComponent } from 'ngx-open-web-ui-chat';

@Component({
  standalone: true,
  imports: [OpenwebuiChatComponent],
  template: `
    <openwebui-chat
      [endpoint]="'https://your-openwebui-instance.com'"
      [modelId]="'llama3'"
      [apiKey]="'sk-your-api-key'">
    </openwebui-chat>
  `
})
export class AppComponent {}

šŸ“– Key Concepts

Conversation History

The component automatically maintains conversation context:

[
  {"role": "user", "content": "Hello"},
  {"role": "assistant", "content": "Hi! How can I help?"},
  {"role": "user", "content": "What did I just say?"},
  {"role": "assistant", "content": "You said 'Hello'"}
]

Features:

  • āœ… Full conversation history sent with each request
  • āœ… AI remembers all previous messages
  • āœ… Context-aware responses

Angular 2025 Architecture

Zoneless Change Detection:

provideZonelessChangeDetection()  // No ZoneJS!

Signals for State:

messages = signal<ChatMessage[]>([]);
isLoading = signal(false);

Modern File Structure:

components/
ā”œā”€ā”€ openwebui-chat.ts       ← Logic
ā”œā”€ā”€ openwebui-chat.html     ← Template
└── openwebui-chat.scss     ← Styles (SCSS!)

šŸ“ Project Structure

openwebui-ts-embedded-sdk/
ā”œā”€ā”€ projects/
│   └── ngx-open-web-ui-chat/    # Library package
│       ā”œā”€ā”€ src/lib/
│       │   ā”œā”€ā”€ components/
│       │   │   ā”œā”€ā”€ openwebui-chat.ts
│       │   │   ā”œā”€ā”€ openwebui-chat.html
│       │   │   ā”œā”€ā”€ openwebui-chat.scss
│       │   │   ā”œā”€ā”€ chat-input/
│       │   │   ā”œā”€ā”€ chat-message/
│       │   │   ā”œā”€ā”€ chat-history-sidebar/
│       │   │   │   ā”œā”€ā”€ sidebar/
│       │   │   │   ā”œā”€ā”€ list/
│       │   │   │   ā”œā”€ā”€ item/
│       │   │   │   ā”œā”€ā”€ header/
│       │   │   │   ā”œā”€ā”€ context-menu/
│       │   │   │   ā”œā”€ā”€ folder-list/
│       │   │   │   ā”œā”€ā”€ folder-item/
│       │   │   │   └── folder-context-menu/
│       │   │   ā”œā”€ā”€ archived-chats-modal/       ← Archived chats modal
│       │   │   ā”œā”€ā”€ attach-webpage-modal/       ← Web page attachment modal
│       │   │   ā”œā”€ā”€ note-editor/                ← Note editor component
│       │   │   ā”œā”€ā”€ notes-sidebar/              ← Notes sidebar component
│       │   │   ā”œā”€ā”€ tools-menu/                 ← Tools selection submenu
│       │   │   ā”œā”€ā”€ chat-search-modal/
│       │   │   ā”œā”€ā”€ confirm-dialog/
│       │   │   ā”œā”€ā”€ error-banner/
│       │   │   ā”œā”€ā”€ export-format-menu/
│       │   │   ā”œā”€ā”€ message-actions/
│       │   │   ā”œā”€ā”€ rating-form/
│       │   │   ā”œā”€ā”€ regenerate-menu/
│       │   │   ā”œā”€ā”€ text-selection-menu/
│       │   │   └── ask-explain-modal/
│       │   ā”œā”€ā”€ services/
│       │   │   └── openwebui-api.ts
│       │   ā”œā”€ā”€ models/
│       │   │   └── chat.model.ts
│       │   ā”œā”€ā”€ utils/
│       │   │   ā”œā”€ā”€ audio-recorder.ts
│       │   │   └── date-formatter.ts
│       │   └── i18n/
│       │       └── translations.ts
│       └── dist/                 # Built package
ā”œā”€ā”€ test-app/                     # Test application
│   ā”œā”€ā”€ src/app/
│   │   ā”œā”€ā”€ app.component.ts
│   │   ā”œā”€ā”€ app.component.html
│   │   └── app.component.scss
│   └── package.json
ā”œā”€ā”€ docs/                         # Documentation
│   ā”œā”€ā”€ API.md
│   ā”œā”€ā”€ I18N.md
│   ā”œā”€ā”€ MARKDOWN.md
│   └── CHANGELOG.md
ā”œā”€ā”€ README.md                     # This file
└── package.json

šŸŽÆ API Reference

Inputs

Input Type Required Default Description
endpoint string āœ… - OpenWebUI instance URL
modelId string āœ… - AI model identifier
apiKey string āœ… - API key
enableMarkdown boolean āŒ true Enable markdown
debug boolean āŒ false Debug logging
language string āŒ 'en' UI language
history boolean āŒ false Enable chat history sidebar
folders boolean āŒ false Enable folder support
notes boolean āŒ false Enable notes feature
integrations boolean āŒ false Enable integrations support
tools boolean āŒ false Enable tools selection menu
showReferenceChats boolean āŒ false Enable reference chat selection
showReferenceNotes boolean āŒ false Enable reference note selection
showAttachWebPage boolean āŒ false Enable web page attachment feature

Outputs

Output Type Description
chatInitialized EventEmitter<void> Chat session ready
messagesChanged EventEmitter<number> Message count changed

Methods

Method Description
sendMessage(message: string) Send a message programmatically
stopGeneration() Stop current AI response generation
clearChat() Clear all messages
createNewChat() Create new chat session
changeModel(modelId: string) Switch to different model

Full API Documentation →

šŸ› ļø Development

Build Library

cd projects/ngx-open-web-ui-chat
npm run build

Output: projects/ngx-open-web-ui-chat/dist/

Test Application

cd test-app
npm start

Visit: http://localhost:4200

Features:

  • Dynamic host & API key configuration
  • Model selection
  • Progressive connection flow
  • Chat controls (clear, disconnect, language)
  • Beautiful UI with step-by-step guide

šŸ“š Documentation

Document Description
API Reference Complete API documentation
Markdown Guide Markdown features & examples
I18N Guide Multi-language support

šŸ”§ Technology Stack

  • Angular 20.x - Latest framework with signals
  • TypeScript 5.8 - Full type safety
  • ng-packagr - Library packaging
  • ngx-markdown - Markdown rendering
  • RxJS - Only for streaming (Angular 2025 pattern)
  • SCSS - Modern styling with nesting

šŸ—ļø Angular 2025 Features

āœ… Zoneless Change Detection - No ZoneJS overhead
āœ… Signals - Reactive state management
āœ… Standalone Components - No NgModules
āœ… Modern File Structure - Separated TS/HTML/SCSS
āœ… inject() DI - Modern dependency injection
āœ… Async/Await - Instead of Observable where appropriate
āœ… Computed Properties - Derived state

šŸŽØ Examples

Basic Usage

<openwebui-chat
  [endpoint]="'https://ai.example.com'"
  [modelId]="'llama3'"
  [apiKey]="'sk-abc123'">
</openwebui-chat>

With Controls

import { Component, ViewChild } from '@angular/core';
import { OpenwebuiChatComponent } from 'ngx-open-web-ui-chat';

@Component({
  template: `
    <button (click)="clearChat()">Clear</button>
    <button (click)="sendGreeting()">Say Hi</button>
    
    <openwebui-chat
      #chat
      [endpoint]="endpoint"
      [modelId]="modelId"
      [apiKey]="apiKey"
      (messagesChanged)="onMessageCount($event)">
    </openwebui-chat>
    
    <p>Messages: {{ messageCount }}</p>
  `
})
export class AppComponent {
  @ViewChild('chat') chat?: OpenwebuiChatComponent;
  messageCount = 0;
  
  clearChat() {
    this.chat?.clearChat();
  }
  
  sendGreeting() {
    this.chat?.sendMessage('Hello!');
  }
  
  onMessageCount(count: number) {
    this.messageCount = count;
  }
}

Multi-language

<openwebui-chat
  [endpoint]="endpoint"
  [modelId]="modelId"
  [apiKey]="apiKey"
  [language]="'en'">
</openwebui-chat>

Supported languages: en, zh, hi, es, ar, fr, pt, ru, bn, ja

šŸš€ Publishing

# 1. Build
cd projects/ngx-open-web-ui-chat
npm run build

# 2. Publish
cd dist
npm publish --access public

šŸ¤ Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make changes
  4. Test thoroughly
  5. Submit pull request

šŸ“ License

MIT License - see LICENSE file for details

šŸŽ“ Best Practices Implemented

  • āœ… Angular 2025 Architecture - Zoneless, signals, modern patterns
  • āœ… Separation of Concerns - TS/HTML/SCSS files
  • āœ… Type Safety - Full TypeScript strict mode
  • āœ… SCSS Features - Nesting, variables, modern CSS
  • āœ… Conversation Context - Full history maintained
  • āœ… Event-Driven - Reactive communication
  • āœ… Responsive Design - Mobile-friendly
  • āœ… Clean Code - Following Angular style guide

šŸ”® Roadmap

Completed Features āœ…

  • āœ… Conversation history with full context
  • āœ… Real-time streaming with Socket.IO
  • āœ… File upload support
  • āœ… Voice input with transcription
  • āœ… Response actions (continue, regenerate, rate)
  • āœ… Chat export (PDF, TXT, JSON)
  • āœ… Folder organization with drag & drop
  • āœ… Notes with markdown editor
  • āœ… Archived chats management
  • āœ… Tools integration
  • āœ… Reference chats and notes
  • āœ… Web search & code interpreter
  • āœ… Multi-language support (10 languages)
  • āœ… Web page attachment with content processing
  • āœ… Conditional feature display with toggles

Planned Features šŸš€

  • Image generation support
  • Voice output (TTS)
  • Custom themes
  • Plugin system
  • Collaborative chats
  • Advanced search filters
  • Chat templates
  • Keyboard shortcuts

Status: Production-ready v1.1.0
Angular Version: 20.x
Node Required: >=20.19.0
TypeScript: ~5.8.0

Made with ā¤ļø using Angular 2025 architecture

About

Angular component library for embedding OpenWebUI chat in applications

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity

Stars

7 stars

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Ɨ600. No cookies required.