# build_messages_input_from_text

> **Function** in `langchain_azure_ai`

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

Build a ``{"messages": [...]}`` payload from a single user text string.

Convenience wrapper used by the Invocations converter when the body is
already a plain string.

## Signature

```python
build_messages_input_from_text(
    text: str,
    *,
    instructions: str | None = None,
) -> dict[str, list[AnyMessage]]
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `text` | `str` | Yes | The user's message text. |
| `instructions` | `str \| None` | No | Optional system instructions. (default: `None`) |

## Returns

`dict[str, list[AnyMessage]]`

The ``{"messages": [...]}`` payload.

---

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