send Message
Sends text as the next turn and returns the model's response.
The turns so far are sent along with text, so the model has the conversation for context. The message and the response are added to the history once the response arrives.
Parameters
The text of the message to send.
Replaces the session config for this turn rather than merging with it.
Replaces the session setting for this turn. Null uses the session's.
Sends content as the next turn and returns the model's response.
The turns so far are sent along with content, so the model has the conversation for context. The message and the response are added to the history once the response arrives.
Parameters
The message to send.
Replaces the session config for this turn rather than merging with it.
Replaces the session setting for this turn. Null uses the session's.
Sends contents as the next turn and returns the model's response.
The turns so far are sent along with contents, so the model has the conversation for context. The message and the response are added to the history once the response arrives.
When automatic function calling is on, one call to this may make several requests: each function the model asks for is run locally and a FunctionResponse is built and sent back to the model, until the model answers or maximumRemoteCalls is reached. The whole exchange is recorded as one turn, and the response returned is the last one the model sent. If the limit is reached the model has not answered yet, a FunctionCall response is returned.
Parameters
The message to send. Several contents are recorded as one turn.
Replaces the session config for this turn rather than merging with it.
Replaces the session setting for this turn rather than merging with it.