# get_content_safety_annotations

> **Function** in `langchain_azure_ai`

📖 [View in docs](https://reference.langchain.com/python/langchain-azure-ai/agents/middleware/content_safety/_base/get_content_safety_annotations)

Extract content-safety annotation payloads from a message.

Inspects the message's ``content`` for ``non_standard_annotation``
blocks whose ``value`` contains ``provider == "azure_content_safety"``.

## Signature

```python
get_content_safety_annotations(
    msg: BaseMessage,
) -> List[ContentSafetyAnnotationPayload]
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `msg` | `BaseMessage` | Yes | A LangChain message to inspect. |

## Returns

`List[ContentSafetyAnnotationPayload]`

List of :class:`ContentSafetyAnnotationPayload` instances found

---

[View source on GitHub](https://github.com/langchain-ai/langchain-azure/blob/7a6a664d617264df8dcb12fcfb1bacc09f21d504/libs/azure-ai/langchain_azure_ai/agents/middleware/content_safety/_base.py#L483)