sendMessageStream

Sends a message to the model in the current multi-turn chat session and returns a stream of responses.

This appends the message and the model's response to the chat history after the stream is consumed. Be sure to initialize a chat session using chats.create() before calling sendMessageStream.

Parameters

text

the text to send to the generative model

config

a com.google.genai.types.GenerateContentConfig instance that specifies the optional configurations *


Sends a message to the model in the current multi-turn chat session and returns a stream of responses.

This appends the message and the model's response to the chat history after the stream is consumed. Be sure to initialize a chat session using chats.create() before calling sendMessageStream.

Parameters

text

the text to send to the generative model


Sends a message to the model in the current multi-turn chat session and returns a stream of responses.

This appends the message and the model's response to the chat history after the stream is consumed. Be sure to initialize a chat session using chats.create() before calling sendMessageStream.

Parameters

content

a com.google.genai.types.Content to send to the generative model

config

a com.google.genai.types.GenerateContentConfig instance that specifies the optional configurations *


Sends a message to the model in the current multi-turn chat session and returns a stream of responses.

This appends the message and the model's response to the chat history after the stream is consumed. Be sure to initialize a chat session using chats.create() before calling sendMessageStream.

Parameters

content

a com.google.genai.types.Content to send to the generative model


Sends a message to the model in the current multi-turn chat session and returns a stream of responses.

This appends the message and the model's response to the chat history after the stream is consumed. Be sure to initialize a chat session using chats.create() before calling sendMessageStream.

Parameters

contents

a < to send to the generative model

config

a com.google.genai.types.GenerateContentConfig instance that specifies the optional configurations


Sends a message to the model in the current multi-turn chat session and returns the model's response.

This appends the message and the model's response to the chat history after the stream is consumed. Be sure to initialize a chat session using chats.create() before calling sendMessageStream.m

Parameters

contents

a < to send to the generative model the optional configurations