RawSdkResponseSession mixin

Mixin for sessions that surface the SDK's structured raw JSON response (LiteRT-LM Gemma 4 path with tool_calls). Allows InferenceChat to read the structured tool calls without a hard dependency on a concrete session type, and lets non-FFI sessions opt out by simply not implementing this mixin.

Superclass constraints

Properties

hashCode → int
The hash code for this object.
no setterinherited
lastRawResponse → String?
Most recent raw SDK JSON. Null until first generation completes.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

addQueryChunk(Message message) → Future<void>
inherited
close() → Future<void>
inherited
getResponse() → Future<String>
inherited
getResponseAsync() → Stream<String>
Streams generated tokens.
inherited
getSessionMetrics() → SessionMetrics
Get session metrics including token usage and performance stats.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sizeInTokens(String text) → Future<int>
inherited
stopGeneration() → Future<void>
Stops the current generation, cancelling native decoding on the .litertlm FFI path. Call this (or cancel() the response subscription) whenever a streamed response is superseded or no longer needed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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