FlutterGemmaAgentSession class final
Agent-session wrapper used by FlutterGemmaAgentBackend.
- Implemented types
Constructors
- FlutterGemmaAgentSession(AgentSession _session)
-
Wraps an already-created provider
session.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
history
→ List<
OmnixMessage> -
A provider-neutral snapshot of the underlying model conversation.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
ask(
String prompt, {Uint8List? imageBytes}) → Stream< OmnixAgentEvent> -
Runs one user turn and streams orchestration and answer events.
override
-
close(
) → Future< void> -
Releases the model session and related native resources.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
replaceHistory(
List< OmnixMessage> messages) → Future<void> -
Replaces native session history with
messages.override -
stop(
) → Future< void> -
Requests cancellation of the active turn.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited