# create_message_model

> **Function** in `langchain_community`

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

Create a message model for a given table name.

## Signature

```python
create_message_model(
    table_name: str,
    DynamicBase: Any,
) -> Any
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `table_name` | `str` | Yes | The name of the table to use. |
| `DynamicBase` | `Any` | Yes | The base class to use for the model. |

## Returns

`Any`

The model class.

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/4b280287bd55b99b44db2dd849f02d66c89534d5/libs/community/langchain_community/chat_message_histories/sql.py#L73)