BaseLlmFlow class

Core LLM flow coordinator for request/response processing and tool loops.

Implementers

Constructors

BaseLlmFlow()
Creates a base LLM flow.

Properties

audioCacheManager → AudioCacheManager
Cache manager used for live audio blob handling.
final
hashCode → int
The hash code for this object.
no setterinherited
liveTaskCompletionDelay ↔ Duration
Optional delay before ending a live run on task_completed.
getter/setter pair
liveToolFinishTimeout ↔ Duration
Maximum time a normally ending live run waits for running non-streaming tool calls to finish before cancelling them.
getter/setter pair
liveTransferAgentDelay ↔ Duration
Optional delay before closing the parent connection on live agent handoff.
getter/setter pair
realtimeCacheManager → AudioCacheManager
Realtime cache manager used for live audio and media blob handling.
no setter
requestProcessors → List<BaseLlmRequestProcessor>
Request processors applied before model generation.
final
responseProcessors → List<BaseLlmResponseProcessor>
Response processors applied after model generation.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
toolRequestProcessors → List<BaseLlmRequestProcessor>
Tool-resolution request processors run immediately after requestProcessors.
latefinal

Methods

getRequestProcessor(String name) → BaseLlmRequestProcessor
Returns the request processor with name.
handleControlEventFlush(InvocationContext context, LlmResponse response) → Future<List<Event>>
Flushes cached live audio and visual events based on control flags in response.
insertRequestProcessorAfter(String targetName, BaseLlmRequestProcessor processor) → void
Inserts processor immediately after targetName.
insertRequestProcessorBefore(String targetName, BaseLlmRequestProcessor processor) → void
Inserts processor immediately before targetName.
mergeFunctionResponses(Stream<Event> modelEvents, LiveFunctionResponseQueue functionResponseQueue) → Stream<Event>
Merges live modelEvents and functionResponseQueue into a single backpressured stream without reading ahead or losing queued responses on connection drop or reconnect.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeRequestProcessor(String name) → BaseLlmRequestProcessor
Removes and returns the named request processor.
replaceRequestProcessor(String name, BaseLlmRequestProcessor replacement) → BaseLlmRequestProcessor
Replaces the named request processor in-place and returns the old one.
runAsync(InvocationContext context) → Stream<Event>
Runs the standard request-response flow until completion.
runLive(InvocationContext context) → Stream<Event>
Runs the flow in live mode when a live queue is available.
screenLiveUserContent(InvocationContext context, Content content, LlmRequest request) → Future<Event?>
Screens live user content with before-model callbacks on a copy of request so callbacks cannot mutate the live session request's config or tools.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

markLiveFunctionDeclarationBehavior(LlmRequest request) → void
Marks FunctionDeclaration.behavior on request for live sessions.