You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/models.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -128,6 +128,29 @@ agent = Agent(model)
128
128
...
129
129
```
130
130
131
+
### OpenAI Responses API
132
+
133
+
PydanticAI also supports OpenAI's [Responses API](https://platform.openai.com/docs/api-reference/responses) through the [`OpenAIResponsesModel`][pydantic_ai.models.openai.OpenAIResponsesModel] class.
134
+
135
+
The Responses API has built-in tools that you can use instead of building your own:
We currently don't support the native OpenAI tools listed above in the `OpenAIResponsesModel` class.
142
+
143
+
You can learn more about the differences between the Responses API and Chat Completions API in the [OpenAI API docs](https://platform.openai.com/docs/guides/responses-vs-chat-completions).
144
+
145
+
```python {title="openai_responses_model.py"}
146
+
from pydantic_ai import Agent
147
+
from pydantic_ai.models.openai import OpenAIResponsesModel
0 commit comments