# extract_text

> **Function** in `langchain_azure_ai`

📖 [View in docs](https://reference.langchain.com/python/langchain-azure-ai/agents/hosting/_converters/_utils/extract_text)

Return the plain-text representation of a LangChain message ``content``.

LangChain message ``content`` is either a string or a list of content
parts. String parts are concatenated; non-string parts (images, files,
tool-use blocks, etc.) are ignored for text extraction.

## Signature

```python
extract_text(
    content: Any,
) -> str
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `content` | `Any` | Yes | The raw ``content`` field of a LangChain message. |

## Returns

`str`

The flattened text content.

---

[View source on GitHub](https://github.com/langchain-ai/langchain-azure/blob/7a6a664d617264df8dcb12fcfb1bacc09f21d504/libs/azure-ai/langchain_azure_ai/agents/hosting/_converters/_utils.py#L40)