A utility class to create a chat session.

Constructors

Methods

Constructors

  • Parameters

    • modelsModule: Models
    • apiClient: ApiClient

    Returns Chats

Methods

  • Creates a new chat session.

    Parameters

    Returns Chat

    A new chat session.

    The config in the params will be used for all requests within the chat session unless overridden by a per-request config in ./types.SendMessageParameters.

    const chat = ai.chats.create({
    model: 'gemini-2.0-flash'
    config: {
    temperature: 0.5,
    maxOutputTokens: 1024,
    }
    });
MMNEPVFCICPMFPCPTTAAATR