# get_messages_from_inputs

> **Function** in `langsmith`

📖 [View in docs](https://reference.langchain.com/python/langsmith/utils/get_messages_from_inputs)

Extract messages from the given inputs dictionary.

## Signature

```python
get_messages_from_inputs(
    inputs: Mapping[str, Any],
) -> list[dict[str, Any]]
```

## Parameters

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

## Returns

`list[dict[str, Any]]`

A list of dictionaries representing the extracted messages.

---

[View source on GitHub](https://github.com/langchain-ai/langsmith-sdk/blob/ce9e9e8973442b33e98ec3ce1b9c2dd3f58a43a7/python/langsmith/utils.py#L250)