The `ChatAdapterExtras` object passed as last parameter to the `batchText` and `streamText` methods contains
information that the adapter might need. It has the following properties.

```tsx
interface ChatAdapterExtras<AiMsg = string> {
    // The props that were passed to the AiChat component
    aiChatProps: AiChatPropsInEvents<AiMsg>;

    // The conversation history
    // Available when `conversationOptions.historyPayloadSize`
    // is set to a value greater than 0 or to `'max'`
    conversationHistory?: ChatItem<AiMsg>[];

    // This contains the headers that implementers can use to send additional data such as authentication headers.
    headers?: Record<string, string>;
}
```

The `ChatItem` type is defined as follows:

```tsx
export type ChatItem<AiMsg = string> = {
    role: 'assistant';
    message: AiMsg;
    serverResponse?: string | object | undefined;
} | {
    role: 'user';
    message: string;
} | {
    role: 'system';
    message: string;
};
```
