TemplateChatSession class final

A back-and-forth chat with a server template.

Records messages sent and received in history. The history will always record the content from the first candidate in the GenerateContentResponse, other candidates may be available on the returned response. The history reflects the most current state of the chat session.

Properties

hashCode int
The hash code for this object.
no setterinherited
history Iterable<Content>
The content that has been successfully sent to, or received from, the generative model.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sendMessage(Content message) Future<GenerateContentResponse>
Sends message to the server template as a continuation of the chat history.
sendMessageStream(Content message) Stream<GenerateContentResponse>
Sends message to the server template as a continuation of the chat history.
toString() String
A string representation of this object.
inherited

Operators

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