# parse_ai_message_to_openai_tool_action

> **Function** in `langchain_classic`

📖 [View in docs](https://reference.langchain.com/python/langchain-classic/agents/output_parsers/openai_tools/parse_ai_message_to_openai_tool_action)

Parse an AI message potentially containing tool_calls.

## Signature

```python
parse_ai_message_to_openai_tool_action(
    message: BaseMessage,
) -> list[AgentAction] | AgentFinish
```

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/c2f4036e4c6ca45a8da8a42d8e07a25d2ea48b8f/libs/langchain/langchain_classic/agents/output_parsers/openai_tools.py#L15)