# SingleStoreDBChatMessageHistory

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/chat_message_histories/singlestoredb/SingleStoreDBChatMessageHistory)

Chat message history stored in a SingleStoreDB database.

## Signature

```python
SingleStoreDBChatMessageHistory(
    self,
    session_id: str,
    *,
    table_name: str = 'message_store',
    id_field: str = 'id',
    session_id_field: str = 'session_id',
    message_field: str = 'message',
    pool_size: int = 5,
    max_overflow: int = 10,
    timeout: float = 30,
    **kwargs: Any = {},
)
```

## Extends

- `BaseChatMessageHistory`

## Constructors

```python
__init__(
    self,
    session_id: str,
    *,
    table_name: str = 'message_store',
    id_field: str = 'id',
    session_id_field: str = 'session_id',
    message_field: str = 'message',
    pool_size: int = 5,
    max_overflow: int = 10,
    timeout: float = 30,
    **kwargs: Any = {},
)
```

| Name | Type |
|------|------|
| `session_id` | `str` |
| `table_name` | `str` |
| `id_field` | `str` |
| `session_id_field` | `str` |
| `message_field` | `str` |
| `pool_size` | `int` |
| `max_overflow` | `int` |
| `timeout` | `float` |


## Properties

- `table_name`
- `session_id`
- `id_field`
- `session_id_field`
- `message_field`
- `connection_kwargs`
- `connection_pool`
- `table_created`
- `messages`

## Methods

- [`add_message()`](https://reference.langchain.com/python/langchain-community/chat_message_histories/singlestoredb/SingleStoreDBChatMessageHistory/add_message)
- [`clear()`](https://reference.langchain.com/python/langchain-community/chat_message_histories/singlestoredb/SingleStoreDBChatMessageHistory/clear)

## ⚠️ Deprecated

Pending deprecation since version 0.3.22. Use from langchain_singlestore import SingleStoreChatMessageHistory instead. This class is pending deprecation and may be removed in a future version. You can swap to using the `SingleStoreChatMessageHistory` implementation in `langchain_singlestore`. See <https://github.com/singlestore-labs/langchain-singlestore> for details  about the new implementation.

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/7c10a5fa327f6aaaf7c932822a9e5d144891406e/libs/community/langchain_community/chat_message_histories/singlestoredb.py#L20)