Chat
Representation of a multi-turn interaction with a model.
Captures and stores the history of communication in memory, and provides it as context with each new message.
Note: This object is not thread-safe, and calling sendMessage multiple times without waiting for a response will throw an InvalidStateException.
Parameters
model
The model to use for the interaction.
Properties
Functions
Link copied to clipboard
Sends a message using the provided text prompt; automatically providing the existing history as context.
Link copied to clipboard
Sends a message using the existing history of this chat as context and the provided Content prompt.
Sends a message using the existing history of this chat as context and the provided text prompt.