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: articles/ai-services/openai/how-to/structured-outputs.md
+10-9Lines changed: 10 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ services: cognitive-services
6
6
manager: nitinme
7
7
ms.service: azure-ai-openai
8
8
ms.topic: how-to
9
-
ms.date: 08/28/2024
9
+
ms.date: 11/20/2024
10
10
author: mrbullwinkle
11
11
ms.author: mbullwin
12
12
recommendations: false
@@ -23,11 +23,12 @@ Structured outputs make a model follow a [JSON Schema](https://json-schema.org/o
23
23
24
24
## Supported models
25
25
26
-
Currently only `gpt-4o` version: `2024-08-06` supports structured outputs.
26
+
-`gpt-4o-mini` version: `2024-07-18`
27
+
-`gpt-4o` version: `2024-08-06`
27
28
28
29
## API support
29
30
30
-
Support for structured outputs was first added in API version `2024-08-01-preview`.
31
+
Support for structured outputs was first added in API version `2024-08-01-preview`. It is available in the latest preview APIs as well as the latest GA API: `2024-10-21`
`response_format` is set to `json_schema` with `strict: true` set.
204
205
205
206
```bash
206
-
curl -X POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/deployments/YOUR_MODEL_DEPLOYMENT_NAME/chat/completions?api-version=2024-08-01-preview \
207
+
curl -X POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/deployments/YOUR_MODEL_DEPLOYMENT_NAME/chat/completions?api-version=2024-10-21 \
207
208
-H "api-key: $AZURE_OPENAI_API_KEY" \
208
209
-H "Content-Type: application/json" \
209
210
-d '{
@@ -294,7 +295,7 @@ from openai import AzureOpenAI
curl -X POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/deployments/YOUR_MODEL_DEPLOYMENT_NAME/chat/completions?api-version=2024-08-01-preview \
358
+
curl -X POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/deployments/YOUR_MODEL_DEPLOYMENT_NAME/chat/completions?api-version=2024-10-21 \
0 commit comments