# convert_prompt_to_anthropic_format

> **Function** in `langsmith`

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

Convert a prompt to Anthropic format.

Requires the `langchain_anthropic` package to be installed.

## Signature

```python
convert_prompt_to_anthropic_format(
    messages: Any,
    model_kwargs: Optional[dict[str, Any]] = None,
) -> dict
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `messages` | `Any` | Yes | The messages to convert. |
| `model_kwargs` | `Optional[Dict[str, Any]]` | No |  Model configuration arguments including `model_name` and `stop`. (default: `None`) |

## Returns

`dict`

The prompt in Anthropic format.

---

[View source on GitHub](https://github.com/langchain-ai/langsmith-sdk/blob/19dc497a3d89638e4cc35db72ea1c29cad35cbbf/python/langsmith/client.py#L10251)