AI Chat

Interactive chat with a mock streaming model. Demonstrates createChatController with real-time streaming, cancellation, and retry.

idle
Send a message to start chatting

Stream Text

Streaming text generation with streamText(). Shows delta$ (individual chunks), text$ (accumulated text), and raw stream$ events from a mock LanguageModel.

idle

text$ (accumulated)

Accumulated text will appear here...

delta$ (individual chunks)

Individual deltas will appear here...

stream$ (raw events)

Stream events will appear here...

Generate Text

Non-streaming text generation with generateText(). Returns a complete TextResult with text, token usage, and finish reason — all in a single Observable emission.

idle

Result

Result will appear here...

Usage & Metadata

-

History

Previous results will appear here...

Reactive Store

A reactive state container with selectors. Demonstrates createStore with setState, patchState, and select.

Counter

0

Theme

Current theme: light

Username

Current: Guest

Live State (state$)


            

Async Controller

Search-as-you-type with auto-cancellation. Demonstrates createAsyncController — each new keystroke cancels the previous in-flight request.

idle
Start typing to search

Command Bus

Type-safe event dispatching. Demonstrates createCommandBus with dispatch and ofType filtering.

Dispatch Commands

Active Filters (ofType)

Event Log

Dispatch a command to see events

Stream Composition

Race two models and compose RxJS operators. Demonstrates race(), adapter composition, and createViewModel.

Race Two Models

Sends the same prompt to a "fast" and "slow" model. The first to respond wins, and the loser is auto-cancelled.

80ms
300ms

Fast Model

-

Slow Model

-

createViewModel

Combines multiple Observable sources into a single projected view model, updating in real-time.

x: 0, y: 0
-
-

Projected ViewModel