Skip to content

Commit a63d03e

Browse files
committed
fix: review
1 parent d341387 commit a63d03e

File tree

7 files changed

+15
-375
lines changed

7 files changed

+15
-375
lines changed

articles/ai-foundry/model-inference/includes/use-chat-reasoning/csharp copy.md

Lines changed: 0 additions & 360 deletions
This file was deleted.

articles/ai-foundry/model-inference/includes/use-structured-outputs/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ To use structured outputs with chat completions models in your application, you
2929

3030
* You can check which models support structured outputs by checking the column **Response format** in the [Models](../../concepts/models.md) article.
3131

32-
* This article uses `Cohere-command-r-plus-08-2024`.
32+
* This article uses `gpt-4o`.

articles/ai-foundry/model-inference/includes/use-structured-outputs/javascript.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ You can use structured outputs with multi-modal models to extract information fr
171171
172172
Let's consider the following chart:
173173

174-
:::image type="content" source="../../media/use-structured-outputs/example_graph_treecover.png" alt-text="An example image showing a chart with the annual loss in thousand square kilometers of global tree cover across different climate zones." lightbox="../../media/use-structured-outputs/example_graph_treecover.png":::
174+
:::image type="content" source="../../media/use-structured-outputs/example-graph-treecover.png" alt-text="An example image showing a chart with the annual loss in thousand square kilometers of global tree cover across different climate zones." lightbox="../../media/use-structured-outputs/example-graph-treecover.png":::
175175

176176
We can define a generic schema that can be used to encode the information contained in the chart and then use it for further analysis.
177177

@@ -297,7 +297,7 @@ var messages = [
297297
content: {
298298
type: "image_url",
299299
image_url: {
300-
url: getImageDataUrl("example_graph_treecover.png", "png"),
300+
url: getImageDataUrl("example-graph-treecover.png", "png"),
301301
},
302302
}
303303
},
@@ -366,6 +366,6 @@ console.log(JSON.stringify(jsonResponseMessage, null, 4));
366366

367367
To see how much information the model was able to capture, we can try to plot the data:
368368

369-
:::image type="content" source="../../media/use-structured-outputs/graph_treecover_plot.png" alt-text="The resulting plot of the data contained in the structured output generated by the model." lightbox="../../media/use-structured-outputs/graph_treecover_plot.png":::
369+
:::image type="content" source="../../media/use-structured-outputs/graph-treecover-plot.png" alt-text="The resulting plot of the data contained in the structured output generated by the model." lightbox="../../media/use-structured-outputs/graph-treecover-plot.png":::
370370

371371
While the information isn't perfect, we can see the model was able to capture a good amount of information from the original chart.

articles/ai-foundry/model-inference/includes/use-structured-outputs/python.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ zone_pivot_groups: azure-ai-inference-samples
3030
endpoint="https://aiservices-demo-wus2.services.ai.azure.com/models",
3131
credential=AzureKeyCredential(os.environ["AZURE_INFERENCE_CREDENTIAL"]),
3232
model="gpt-4o",
33-
api-version="2024-05-01-preview"
33+
api_version="2024-12-01-preview"
3434
)
3535
```
3636

@@ -303,7 +303,7 @@ You can use structured outputs with multi-modal models to extract information fr
303303

304304
Let's consider the following chart:
305305

306-
:::image type="content" source="../../media/use-structured-outputs/example_graph_treecover.png" alt-text="An example image showing a chart with the annual loss in thousand square kilometers of global tree cover across different climate zones." lightbox="../../media/use-structured-outputs/example_graph_treecover.png":::
306+
:::image type="content" source="../../media/use-structured-outputs/example-graph-treecover.png" alt-text="An example image showing a chart with the annual loss in thousand square kilometers of global tree cover across different climate zones." lightbox="../../media/use-structured-outputs/example-graph-treecover.png":::
307307

308308
We can define a generic schema that can be used to encode the information contained in the chart and then use it for further analysis. We use [Pyndatic objects](#use-pydantic-objects) as described before.
309309

@@ -330,7 +330,7 @@ We can load the image as follows to pass it to the model:
330330
from azure.ai.inference.models import ImageContentItem, ImageUrl
331331

332332
image_graph = ImageUrl.load(
333-
image_file="example_graph_treecover.png",
333+
image_file="example-graph-treecover.png",
334334
image_format="png"
335335
)
336336
```
@@ -430,6 +430,6 @@ plt.tight_layout()
430430
plt.show()
431431
```
432432

433-
:::image type="content" source="../../media/use-structured-outputs/graph_treecover_plot.png" alt-text="The resulting plot of the data contained in the structured output generated by the model." lightbox="../../media/use-structured-outputs/graph_treecover_plot.png":::
433+
:::image type="content" source="../../media/use-structured-outputs/graph-treecover-plot.png" alt-text="The resulting plot of the data contained in the structured output generated by the model." lightbox="../../media/use-structured-outputs/graph-treecover-plot.png":::
434434

435435
While the information isn't perfect, we can see the model was able to capture a good amount of information from the original chart.

articles/ai-foundry/model-inference/includes/use-structured-outputs/rest.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ We can use structure outputs with the defined schema as follows:
6868
__Request__
6969

7070
```http
71-
POST https://<resource>.services.ai.azure.com/models/chat/completions?api-version=2024-05-01-preview
71+
POST https://<resource>.services.ai.azure.com/models/chat/completions?api-version=2024-12-01-preview
7272
Content-Type: application/json
7373
api-key: <key>
7474
```
@@ -125,7 +125,7 @@ __Body__
125125
"strict": true
126126
}
127127
},
128-
"model": "Cohere-command-r-plus-08-2024"
128+
"model": "gpt-4o"
129129
}
130130
```
131131

@@ -138,7 +138,7 @@ __Response__
138138
"id": "0a1234b5de6789f01gh2i345j6789klm",
139139
"object": "chat.completion",
140140
"created": 1718726686,
141-
"model": "Cohere-command-r-plus-08-2024",
141+
"model": "gpt-4o",
142142
"choices": [
143143
{
144144
"index": 0,
@@ -170,7 +170,7 @@ You can use structured outputs with multi-modal models to extract information fr
170170

171171
Let's consider the following chart:
172172

173-
:::image type="content" source="../../media/use-structured-outputs/example_graph_treecover.png" alt-text="An example image showing a chart with the annual loss in thousand square kilometers of global tree cover across different climate zones." lightbox="../../media/use-structured-outputs/example_graph_treecover.png":::
173+
:::image type="content" source="../../media/use-structured-outputs/example-graph-treecover.png" alt-text="An example image showing a chart with the annual loss in thousand square kilometers of global tree cover across different climate zones." lightbox="../../media/use-structured-outputs/example-graph-treecover.png":::
174174

175175
We can define a generic schema that can be used to encode the information contained in the chart and then use it for further analysis.
176176

@@ -261,7 +261,7 @@ We can use structure outputs with the defined schema as follows:
261261
__Request__
262262

263263
```http
264-
POST https://<resource>.services.ai.azure.com/models/chat/completions?api-version=2024-05-01-preview
264+
POST https://<resource>.services.ai.azure.com/models/chat/completions?api-version=2024-12-01-preview
265265
Content-Type: application/json
266266
api-key: <key>
267267
```
@@ -366,7 +366,7 @@ __Body__
366366
"strict": true
367367
}
368368
},
369-
"model": "Cohere-command-r-plus-08-2024"
369+
"model": "gpt-4o"
370370
}
371371
```
372372

@@ -379,7 +379,7 @@ __Response__
379379
"id": "0a1234b5de6789f01gh2i345j6789klm",
380380
"object": "chat.completion",
381381
"created": 1718726686,
382-
"model": "Cohere-command-r-plus-08-2024",
382+
"model": "gpt-4o",
383383
"choices": [
384384
{
385385
"index": 0,

0 commit comments

Comments
 (0)