sendMessage

Sends a message using the provided prompt; automatically providing the existing history as context.

If successful, the message and response will be added to the history. If unsuccessful, history will remain unchanged.

Parameters

prompt

The input that, together with the history, will be given to the model as the prompt.

Throws

if the Chat instance has an active request.


Sends a message using the provided text prompt; automatically providing the existing history as context.

If successful, the message and response will be added to the history. If unsuccessful, history will remain unchanged.

Parameters

prompt

The input that, together with the history, will be given to the model as the prompt.

Throws

if the Chat instance has an active request.