# merge_content

> **Function** in `langchain_core`

📖 [View in docs](https://reference.langchain.com/python/langchain-core/messages/base/merge_content)

Merge multiple message contents.

## Signature

```python
merge_content(
    first_content: str | list[str | dict],
    *contents: str | list[str | dict] = (),
) -> str | list[str | dict]
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `first_content` | `str \| list[str \| dict]` | Yes | The first `content`. Can be a string or a list. |
| `contents` | `str \| list[str \| dict]` | No | The other `content`s. Can be a string or a list. (default: `()`) |

## Returns

`str | list[str | dict]`

The merged content.

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/ee95ad6907f5eab94644183393a20aa2a032bb19/libs/core/langchain_core/messages/base.py#L366)