# convert_message_to_dict

> **Function** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/adapters/openai/convert_message_to_dict)

Convert a LangChain message to a dictionary.

## Signature

```python
convert_message_to_dict(
    message: BaseMessage,
) -> dict
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `message` | `BaseMessage` | Yes | The LangChain message. |

## Returns

`dict`

The dictionary.

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/a6a6079511ac8a5c1293337f88096b8641562e77/libs/community/langchain_community/adapters/openai.py#L114)