# convert_message_to_dict

> **Function** in `langchain_nvidia_ai_endpoints`

📖 [View in docs](https://reference.langchain.com/python/langchain-nvidia-ai-endpoints/_utils/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-nvidia/blob/0ca4191cf2239c4990e4706ac1005463f27ff325/libs/ai-endpoints/langchain_nvidia_ai_endpoints/_utils.py#L61)