OAuthBackend

A ChatBackend for signed-in providers: takes a fresh access token each turn and builds the protocol backend with it. If the provider rejects the token (401) before anything was streamed, it refreshes once and retries.

Constructors

Link copied to clipboard
constructor(tokens: TokenSource, backendFor: (OAuthTokens) -> ChatBackend)

Functions

Link copied to clipboard
open override fun stream(history: List<Message>): Flow<ChatEvent>