Base class for various `ChatSession` classes that enables sending chat messages and stores history of sent and received messages so far.

**Signature:**

    export declare abstract class ChatSessionBase<ParamsType extends StartChatParams | StartTemplateChatParams, RequestType, FunctionDeclarationsToolType extends FunctionDeclarationsTool | TemplateFunctionDeclarationsTool> 

## Constructors

| Constructor | Modifiers | Description |
|---|---|---|
| [(constructor)(apiSettings, params, requestOptions)](https://firebase.google.com/docs/reference/js/ai.chatsessionbase#chatsessionbaseconstructor) |   | Constructs a new instance of the `ChatSessionBase` class |

## Properties

| Property | Modifiers | Type | Description |
|---|---|---|---|
| [_apiSettings](https://firebase.google.com/docs/reference/js/ai.chatsessionbase#chatsessionbase_apisettings) |   | ApiSettings |   |
| [_history](https://firebase.google.com/docs/reference/js/ai.chatsessionbase#chatsessionbase_history) |   | [Content](https://firebase.google.com/docs/reference/js/ai.content#content_interface)\[\] |   |
| [params](https://firebase.google.com/docs/reference/js/ai.chatsessionbase#chatsessionbaseparams) |   | ParamsType \| undefined |   |
| [requestOptions](https://firebase.google.com/docs/reference/js/ai.chatsessionbase#chatsessionbaserequestoptions) |   | [RequestOptions](https://firebase.google.com/docs/reference/js/ai.requestoptions#requestoptions_interface) \| undefined |   |

## Methods

| Method | Modifiers | Description |
|---|---|---|
| [getHistory()](https://firebase.google.com/docs/reference/js/ai.chatsessionbase#chatsessionbasegethistory) |   | 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. |

## ChatSessionBase.(constructor)

Constructs a new instance of the `ChatSessionBase` class

**Signature:**

    constructor(apiSettings: ApiSettings, params?: ParamsType | undefined, requestOptions?: RequestOptions | undefined);

#### Parameters

| Parameter | Type | Description |
|---|---|---|
| apiSettings | ApiSettings |   |
| params | ParamsType \| undefined |   |
| requestOptions | [RequestOptions](https://firebase.google.com/docs/reference/js/ai.requestoptions#requestoptions_interface) \| undefined |   |

## ChatSessionBase._apiSettings

**Signature:**

    protected _apiSettings: ApiSettings;

## ChatSessionBase._history

**Signature:**

    protected _history: Content[];

## ChatSessionBase.params

**Signature:**

    params?: ParamsType | undefined;

## ChatSessionBase.requestOptions

**Signature:**

    requestOptions?: RequestOptions | undefined;

## ChatSessionBase.getHistory()

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.

**Signature:**

    getHistory(): Promise<Content[]>;

**Returns:**

Promise\<[Content](https://firebase.google.com/docs/reference/js/ai.content#content_interface)\[\]\>