Conversation class
Represents a conversation with the LiteRT-LM model.
Properties
Methods
-
cancel(
) → Future< void> - Cancels the ongoing inference process.
-
dispose(
) → Future< void> - Releases the native conversation resources.
-
getTokenCount(
) → Future< int> - Gets the number of tokens in the conversation KV Cache.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
renderMessageIntoString(
Message message) → Future< String> - Renders the message into a string according to the template.
-
sendMessage(
Message message, {Map< String, Object?> ? extraContext}) → Future<Message> - Sends a message to the conversation and returns the response.
-
sendMessageStream(
Message message, {Map< String, Object?> ? extraContext}) → Stream<Message> - Sends a message to the conversation and streams the response.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited