React Native Firebase
    Preparing search index...

    Interface representing a ChatSession that enables sending chat messages and stores a history of sent and received messages so far.

    interface ChatSession {
        model: string;
        params?: StartChatParams;
        requestOptions?: RequestOptions;
        getHistory(): Promise<Content[]>;
        sendMessage(
            request: string | (string | Part)[],
            singleRequestOptions?: SingleRequestOptions,
        ): Promise<GenerateContentResult>;
        sendMessageStream(
            request: string | (string | Part)[],
            singleRequestOptions?: SingleRequestOptions,
        ): Promise<GenerateContentStreamResult>;
    }
    Index

    Methods

    • Gets the chat history so far. Blocked prompts are not added to history. Neither blocked candidates nor the prompts that generated them are added to history.

      Returns Promise<Content[]>

    Properties

    model: string
    requestOptions?: RequestOptions