# 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/025f99f43bf1d1dadc37798e6654d7d132c040cd/libs/ai-endpoints/langchain_nvidia_ai_endpoints/_utils.py#L91)