Skip to content

Commit 2b2e808

Browse files
committed
add example
1 parent 26f2237 commit 2b2e808

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

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

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,29 @@ The following is a sample request body. The format is the same as the chat compl
162162
> ...
163163
> ```
164164

165-
### Output
165+
### Detail parameter settings
166+
167+
You can optionally define a `"detail"` parameter in the `"image_url"` field. Choose one of three values, `low`, `high`, or `auto`, to adjust the way the model interprets and processes images.
168+
- `auto` setting: The default setting. The model decides between low or high based on the size of the image input.
169+
- `low` setting: the model does not activate the "high res" mode, instead processes a lower resolution 512x512 version, resulting in quicker responses and reduced token consumption for scenarios where fine detail isn't crucial.
170+
- `high` setting: the model activates "high res" mode. Here, the model initially views the low-resolution image and then generates detailed 512x512 segments from the input image. Each segment uses double the token budget, allowing for a more detailed interpretation of the image.
171+
172+
You set the value using the format shown in this example:
173+
174+
```json
175+
{
176+
"type": "image_url",
177+
"image_url": {
178+
"url": "<image URL>",
179+
"detail": "high"
180+
}
181+
}
182+
```
183+
184+
For details on how the image parameters impact tokens used and pricing please see - [What is Azure OpenAI? Image Tokens](../overview.md#image-tokens)
185+
186+
187+
## Output
166188

167189
The API response should look like the following.
168190

@@ -236,13 +258,6 @@ Every response includes a `"finish_reason"` field. It has the following possible
236258
- `length`: Incomplete model output due to the `max_tokens` input parameter or model's token limit.
237259
- `content_filter`: Omitted content due to a flag from our content filters.
238260

239-
### Detail parameter settings in image processing: Low, High, Auto
240-
241-
The _detail_ parameter in the model offers three choices: `low`, `high`, or `auto`, to adjust the way the model interprets and processes images. The default setting is auto, where the model decides between low or high based on the size of the image input.
242-
- `low` setting: the model does not activate the "high res" mode, instead processes a lower resolution 512x512 version, resulting in quicker responses and reduced token consumption for scenarios where fine detail isn't crucial.
243-
- `high` setting: the model activates "high res" mode. Here, the model initially views the low-resolution image and then generates detailed 512x512 segments from the input image. Each segment uses double the token budget, allowing for a more detailed interpretation of the image.''
244-
245-
For details on how the image parameters impact tokens used and pricing please see - [What is Azure OpenAI? Image Tokens](../overview.md#image-tokens)
246261

247262

248263

0 commit comments

Comments
 (0)