Modern Angular 20 library for embedding OpenWebUI chat in your applications with full conversation history, markdown support, and Angular 2025 architecture.
Interactive demo showcasing all features:
- Dynamic configuration
- Model selection
- Real-time chat with conversation history
- Markdown rendering
- Multi-language support
When you first launch the application, enter your OpenWebUI server details:
Required:
- Host URL - Your OpenWebUI server address (e.g.,
http://localhost:8080) - API Key - Your API authentication key
Click "Show Models" to fetch the list of AI models from your server:
Choose an AI model from the dropdown menu:
Click "Connect Chat" to initialize your chat session:
Type your message and click "Send" or press Enter:
Features:
- View all conversations
- Organize chats into folders
- Pin important chats
- Search through history
- Archive old conversations
- Export chats (PDF, TXT, JSON)
Create and manage notes with a built-in markdown editor:
Features:
- Rich markdown editor
- Auto-save functionality
- Search through notes
- Reference notes in chats
- Organize with folders
- š 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
npm install ngx-open-web-ui-chat
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));
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 {}
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
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!)
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
| 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 |
| Output | Type | Description |
|---|---|---|
chatInitialized |
EventEmitter<void> |
Chat session ready |
messagesChanged |
EventEmitter<number> |
Message count changed |
| 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 |
cd projects/ngx-open-web-ui-chat
npm run buildOutput: projects/ngx-open-web-ui-chat/dist/
cd test-app
npm startVisit: 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
| Document | Description |
|---|---|
| API Reference | Complete API documentation |
| Markdown Guide | Markdown features & examples |
| I18N Guide | Multi-language support |
- 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
ā
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
<openwebui-chat [endpoint]="'https://ai.example.com'" [modelId]="'llama3'" [apiKey]="'sk-abc123'"> </openwebui-chat>
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; } }
<openwebui-chat [endpoint]="endpoint" [modelId]="modelId" [apiKey]="apiKey" [language]="'en'"> </openwebui-chat>
Supported languages: en, zh, hi, es, ar, fr, pt, ru, bn, ja
# 1. Build cd projects/ngx-open-web-ui-chat npm run build # 2. Publish cd dist npm publish --access public
- Fork the repository
- Create a feature branch
- Make changes
- Test thoroughly
- Submit pull request
MIT License - see LICENSE file for details
- ā 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
- ā 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
- 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





