LiteRtLmConversationHandle class

One conversation owned by a LiteRtLmFfiClient. Each call to LiteRtLmFfiClient.createConversationHandle returns a fresh handle: the engine pointer is shared across handles, the conversation pointer is private to this handle.

This is what makes concurrent sessions possible — the LiteRT-LM C API supports multiple LiteRtLmConversation* per engine; the handle owns one and routes every per-conversation native call through the client's private _…On(conv, …) methods.

Lifetime contract: the caller must call close when done. The owning client closes any remaining handles on LiteRtLmFfiClient.shutdown.

Implemented types

Properties

hashCode int
The hash code for this object.
no setterinherited
isClosed bool
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancelGeneration() → void
override
chat(String text, {List<Uint8List>? imageBytes, Uint8List? audioBytes, bool enableThinking = false}) Stream<String>
override
chatRaw(String text, {List<Uint8List>? imageBytes, Uint8List? audioBytes, bool enableThinking = false}) Stream<String>
override
close() → void
override
getSessionMetrics() SessionMetrics
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sendMessage(String messageJson, {String? extraContext}) Future<String>
sendMessageStreamRaw(String messageJson, {String? extraContext}) Stream<String>
toString() String
A string representation of this object.
inherited

Operators

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