> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ag2.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# autogen.oai.anthropic.oai_messages_to_anthropic_messages

<code class="doc-symbol doc-symbol-heading doc-symbol-function" />

#### oai\_messages\_to\_anthropic\_messages

```python theme={null}
oai_messages_to_anthropic_messages(params: dict[str, Any]) -> list[dict[str, Any]]
```

Convert messages from OAI format to Anthropic format.<br />We correct for any specific role orders and types, etc.

<b>Parameters:</b>

| Name     | Description               |
| -------- | ------------------------- |
| `params` | **Type:** dict\[str, Any] |

<br />
