Skip to content

Commit 62f153c

Browse files
authored
Merge pull request #122102 from Nilhenrik/patch-1
Update gpt-with-vision.md
2 parents 301d03e + 3bd938d commit 62f153c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

articles/ai-services/openai/how-to/gpt-with-vision.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ Send a POST request to `https://{RESOURCE_NAME}.openai.azure.com/openai/deployme
275275

276276
The format is similar to that of the chat completions API for GPT-4, but the message content can be an array containing strings and images (either a valid HTTP or HTTPS URL to an image, or a base-64-encoded image).
277277

278-
You must also include the `enhancements` and `data_sources` objects. `enhancements` represents the specific Vision enhancement features requested in the chat. It has a `grounding` and `ocr` property, which both have a boolean `enabled` property. Use these to request the OCR service and/or the object detection/grounding service. `data_sources` represents the Computer Vision resource data that's needed for Vision enhancement. It has a `type` property which should be `"AzureComputerVision"` and a `parameters` property. Set the `endpoint` and `key` to the endpoint URL and access key of your Computer Vision resource.
278+
You must also include the `enhancements` and `dataSources` objects. `enhancements` represents the specific Vision enhancement features requested in the chat. It has a `grounding` and `ocr` property, which both have a boolean `enabled` property. Use these to request the OCR service and/or the object detection/grounding service. `dataSources` represents the Computer Vision resource data that's needed for Vision enhancement. It has a `type` property which should be `"AzureComputerVision"` and a `parameters` property. Set the `endpoint` and `key` to the endpoint URL and access key of your Computer Vision resource.
279279

280280
> [!IMPORTANT]
281281
> Remember to set a `"max_tokens"` value, or the return output will be cut off.
@@ -291,7 +291,7 @@ You must also include the `enhancements` and `data_sources` objects. `enhancemen
291291
"enabled": true
292292
}
293293
},
294-
"data_sources": [
294+
"dataSources": [
295295
{
296296
"type": "AzureComputerVision",
297297
"parameters": {
@@ -327,11 +327,11 @@ You must also include the `enhancements` and `data_sources` objects. `enhancemen
327327

328328
#### [Python](#tab/python)
329329

330-
You call the same method as in the previous step, but include the new *extra_body* parameter. It contains the `enhancements` and `data_sources` fields.
330+
You call the same method as in the previous step, but include the new *extra_body* parameter. It contains the `enhancements` and `dataSources` fields.
331331

332332
`enhancements` represents the specific Vision enhancement features requested in the chat. It has a `grounding` and `ocr` field, which both have a boolean `enabled` property. Use these to request the OCR service and/or the object detection/grounding service.
333333

334-
`data_sources` represents the Computer Vision resource data that's needed for Vision enhancement. It has a `type` field which should be `"AzureComputerVision"` and a `parameters` field. Set the `endpoint` and `key` to the endpoint URL and access key of your Computer Vision resource. R
334+
`dataSources` represents the Computer Vision resource data that's needed for Vision enhancement. It has a `type` field which should be `"AzureComputerVision"` and a `parameters` field. Set the `endpoint` and `key` to the endpoint URL and access key of your Computer Vision resource. R
335335

336336
> [!IMPORTANT]
337337
> Remember to set a `"max_tokens"` value, or the return output will be cut off.
@@ -356,7 +356,7 @@ response = client.chat.completions.create(
356356
] }
357357
],
358358
extra_body={
359-
"data_sources": [
359+
"dataSources": [
360360
{
361361
"type": "AzureComputerVision",
362362
"parameters": {
@@ -587,7 +587,7 @@ To use a User assigned identity on your Azure AI Services resource, follow these
587587
"enabled": true
588588
}
589589
},
590-
"data_sources": [
590+
"dataSources": [
591591
{
592592
"type": "AzureComputerVisionVideoIndex",
593593
"parameters": {
@@ -620,7 +620,7 @@ To use a User assigned identity on your Azure AI Services resource, follow these
620620
}
621621
```
622622
623-
The request includes the `enhancements` and `data_sources` objects. `enhancements` represents the specific Vision enhancement features requested in the chat. `data_sources` represents the Computer Vision resource data that's needed for Vision enhancement. It has a `type` property which should be `"AzureComputerVisionVideoIndex"` and a `parameters` property which contains your AI Vision and video information.
623+
The request includes the `enhancements` and `dataSources` objects. `enhancements` represents the specific Vision enhancement features requested in the chat. `dataSources` represents the Computer Vision resource data that's needed for Vision enhancement. It has a `type` property which should be `"AzureComputerVisionVideoIndex"` and a `parameters` property which contains your AI Vision and video information.
624624
1. Fill in all the `<placeholder>` fields above with your own information: enter the endpoint URLs and keys of your OpenAI and AI Vision resources where appropriate, and retrieve the video index information from the earlier step.
625625
1. Send the POST request to the API endpoint. It should contain your OpenAI and AI Vision credentials, the name of your video index, and the ID and SAS URL of a single video.
626626

0 commit comments

Comments
 (0)