Optional
configConfig for the entire chat session.
This config applies to all requests within the session
unless overridden by a per-request config
in SendMessageParameters
.
Optional
historyThe initial conversation history for the chat session.
This allows you to start the chat with a pre-existing history. The history
must be a list of Content
alternating between 'user' and 'model' roles.
It should start with a 'user' message.
The name of the model to use for the chat session.
For example: 'gemini-2.0-flash', 'gemini-1.5-pro', etc. See gemini API docs to find the available models.
Parameters for initializing a new chat session.
These parameters are used when creating a chat session with the
chats.create()
method.