Each one is a real, working piece of the AIR docs, not sample code written for this page.
Example: basic chat
Single provider, single request.
Example: multiple providers
Registering all four built in providers with priorities.
Example: automatic fallback
Runnable demo of a failing provider triggering fallback.
Example: manual provider selection
Forcing a specific provider via ChatRequest and Session.chat.
Example: sessions
In memory session usage: chat, history, clear.
Example: persistent (SQLite) sessions
SQLite backed sessions and reopening the same database.
Example: intelligent routing
Capability based provider selection for a coding request.
Example: context optimization
Triggering compression on a long conversation and reading the metadata.
Example: structured events
Subscribing to events and reading response.structured_events.
Example: TTS announcements
Enabling the announcer with a custom backend.