# 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/7c10a5fa327f6aaaf7c932822a9e5d144891406e/libs/community/langchain_community/adapters/openai.py#L114)