# convert_dict_to_message

> **Function** in `langchain_community`

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

Convert a dictionary to a LangChain message.

## Signature

```python
convert_dict_to_message(
    _dict: Mapping[str, Any],
) -> BaseMessage
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `_dict` | `Mapping[str, Any]` | Yes | The dictionary. |

## Returns

`BaseMessage`

The LangChain message.

---

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