AI Chat
Interactive chat with a mock streaming model. Demonstrates createChatController with real-time streaming, cancellation, and retry.
Stream Text
Streaming text generation with streamText(). Shows delta$ (individual chunks), text$ (accumulated text), and raw stream$ events from a mock LanguageModel.
text$ (accumulated)
delta$ (individual chunks)
stream$ (raw events)
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.
Result
Usage & Metadata
History
Reactive Store
A reactive state container with selectors. Demonstrates createStore with setState, patchState, and select.
Counter
Theme
Username
Live State (state$)
Async Controller
Search-as-you-type with auto-cancellation. Demonstrates createAsyncController — each new keystroke cancels the previous in-flight request.
Command Bus
Type-safe event dispatching. Demonstrates createCommandBus with dispatch and ofType filtering.
Dispatch Commands
Active Filters (ofType)
Event Log
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.
Fast Model
Slow Model
createViewModel
Combines multiple Observable sources into a single projected view model, updating in real-time.