Skip to content

Commit 171e47b

Browse files
committed
merge from main
2 parents 827527f + 3f5af48 commit 171e47b

File tree

263 files changed

+431
-335
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

263 files changed

+431
-335
lines changed

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

Lines changed: 53 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,7 @@ The API response should look like the following.
101101
],
102102
"choices": [
103103
{
104-
"finish_details": {
105-
"type": "stop",
106-
"stop": "<|fim_suffix|>"
107-
},
104+
"finish_reason":"stop",
108105
"index": 0,
109106
"message": {
110107
"role": "assistant",
@@ -138,13 +135,11 @@ The API response should look like the following.
138135
}
139136
```
140137

141-
Every response includes a `"finish_details"` field. The subfield `"type"` has the following possible values:
138+
Every response includes a `"finish_reason"` field. It has the following possible values:
142139
- `stop`: API returned complete model output.
143-
- `max_tokens`: Incomplete model output due to the `max_tokens` input parameter or model's token limit.
140+
- `length`: Incomplete model output due to the `max_tokens` input parameter or model's token limit.
144141
- `content_filter`: Omitted content due to a flag from our content filters.
145142

146-
If `finish_details.type` is `stop`, then there is another `"stop"` property that specifies the token that caused the output to end.
147-
148143
## Detail parameter settings in image processing: Low, High, Auto
149144

150145
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.
@@ -239,11 +234,7 @@ The chat responses you receive from the model should now include enhanced inform
239234
"choices":
240235
[
241236
{
242-
"finish_details":
243-
{
244-
"type": "stop",
245-
"stop": "<|fim_suffix|>"
246-
},
237+
"finish_reason":"stop",
247238
"index": 0,
248239
"message":
249240
{
@@ -283,13 +274,11 @@ The chat responses you receive from the model should now include enhanced inform
283274
}
284275
```
285276

286-
Every response includes a `"finish_details"` field. The subfield `"type"` has the following possible values:
277+
Every response includes a `"finish_reason"` field. It has the following possible values:
287278
- `stop`: API returned complete model output.
288-
- `max_tokens`: Incomplete model output due to the `max_tokens` input parameter or model's token limit.
279+
- `length`: Incomplete model output due to the `max_tokens` input parameter or model's token limit.
289280
- `content_filter`: Omitted content due to a flag from our content filters.
290281

291-
If `finish_details.type` is `stop`, then there is another `"stop"` property that specifies the token that caused the output to end.
292-
293282
## Use Vision enhancement with video
294283

295284
GPT-4 Turbo with Vision provides exclusive access to Azure AI Services tailored enhancements. The **video prompt** integration uses Azure AI Vision video retrieval to sample a set of frames from a video and create a transcript of the speech in the video. It enables the AI model to give summaries and answers about video content.
@@ -377,11 +366,7 @@ The chat responses you receive from the model should include information about t
377366
"choices":
378367
[
379368
{
380-
"finish_details":
381-
{
382-
"type": "stop",
383-
"stop": "<|fim_suffix|>"
384-
},
369+
"finish_reason":"stop",
385370
"index": 0,
386371
"message":
387372
{
@@ -399,13 +384,56 @@ The chat responses you receive from the model should include information about t
399384
}
400385
```
401386

402-
Every response includes a `"finish_details"` field. The subfield `"type"` has the following possible values:
387+
Every response includes a `"finish_reason"` field. It has the following possible values:
403388
- `stop`: API returned complete model output.
404-
- `max_tokens`: Incomplete model output due to the `max_tokens` input parameter or model's token limit.
389+
- `length`: Incomplete model output due to the `max_tokens` input parameter or model's token limit.
405390
- `content_filter`: Omitted content due to a flag from our content filters.
406391

407-
If `finish_details.type` is `stop`, then there is another `"stop"` property that specifies the token that caused the output to end.
392+
### Pricing example for Video prompts
393+
The pricing for GPT-4 Turbo with Vision is dynamic and depends on the specific features and inputs used. For a comprehensive view of Azure OpenAI pricing see [Azure OpenAI Pricing](https://azure.microsoft.com/pricing/details/cognitive-services/openai-service/).
394+
395+
The base charges and additional features are outlined below:
396+
397+
Base Pricing for GPT-4 Turbo with Vision is:
398+
- Input: $0.01 per 1000 tokens
399+
- Output: $0.03 per 1000 tokens
400+
401+
Video prompt integration with Video Retrieval Add-on:
402+
- Ingestion: $0.05 per minute of video
403+
- Transactions: $0.25 per 1000 queries of the Video Retrieval index
404+
405+
Processing videos will involve the use of extra tokens to identify key frames for analysis. The number of these additional tokens will be roughly equivalent to the sum of the tokens in the text input plus 700 tokens.
406+
407+
#### Calculation
408+
For a typical use case let's imagine that I have use a 3-minute video with a 100-token prompt input. The section of video has a transcript that's 100-tokens long and when I process the prompt, I generate 100-tokens of output. The pricing for this transaction would be as follows:
409+
410+
| Item | Detail | Total Cost |
411+
|-------------------------------------------|---------------------------------------------------------------|--------------|
412+
| GPT-4 Turbo with Vision Input Tokens | 100 text tokens | $0.001 |
413+
| Additional Cost to identify frames | 100 input tokens + 700 tokens + 1 Video Retrieval txn | $0.00825 |
414+
| Image Inputs and Transcript Input | 20 images (85 tokens each) + 100 transcript tokens | $0.018 |
415+
| Output Tokens | 100 tokens (assumed) | $0.003 |
416+
| **Total Cost** | | **$0.03025** |
417+
418+
Additionally, there's a one-time indexing cost of $0.15 to generate the Video Retrieval index for this 3-minute segment of video. This index can be reused across any number of Video Retrieval and GPT-4 Turbo with Vision calls.
419+
420+
## Limitations
421+
422+
### Image support
423+
424+
- **Limitation on image enhancements per chat session**: Enhancements cannot be applied to multiple images within a single chat call.
425+
- **Maximum input image size**: The maximum size for input images is restricted to 20 MB.
426+
- **Object grounding in enhancement API**: When the enhancement API is used for object grounding, and the model detects duplicates of an object, it will generate one bounding box and label for all the duplicates instead of separate ones for each.
427+
- **Low resolution accuracy**: When images are analyzed using the "low resolution" setting, it allows for faster responses and uses fewer input tokens for certain use cases. However, this could impact the accuracy of object and text recognition within the image.
428+
- **Image chat restriction**: When uploading images in the chat playground or the API, there is a limit of 10 images per chat call.
429+
430+
### Video support
408431

432+
- **Low resolution**: Video frames are analyzed using GPT-4 Turbo with Vision's "low resolution" setting, which may affect the accuracy of small object and text recognition in the video.
433+
- **Video file limits**: Both MP4 and MOV file types are supported. In the Azure AI Playground, videos must be less than 3 minutes long. When you use the API there is no such limitation.
434+
- **Prompt limits**: Video prompts only contain one video and no images. In Playground, you can clear the session to try another video or images.
435+
- **Limited frame selection**: The service selects 20 frames from the entire video, which might not capture all the critical moments or details. Frame selection can be approximately evenly spread through the video or focused by a specific video retrieval query, depending on the prompt.
436+
- **Language support**: The service primarily supports English for grounding with transcripts. Transcripts don't provide accurate information on lyrics in songs.
409437

410438
## Next steps
411439

articles/ai-services/policy-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Built-in policy definitions for Azure AI services
33
description: Lists Azure Policy built-in policy definitions for Azure AI services. These built-in policy definitions provide common approaches to managing your Azure resources.
4-
ms.date: 12/13/2023
4+
ms.date: 01/02/2024
55
author: nitinme
66
ms.author: nitinme
77
ms.service: azure-ai-services

articles/aks/policy-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Built-in policy definitions for Azure Kubernetes Service
33
description: Lists Azure Policy built-in policy definitions for Azure Kubernetes Service. These built-in policy definitions provide common approaches to managing your Azure resources.
4-
ms.date: 12/13/2023
4+
ms.date: 01/02/2024
55
ms.topic: reference
66
ms.custom: subject-policy-reference
77
---

articles/api-management/policy-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Built-in policy definitions for Azure API Management
33
description: Lists Azure Policy built-in policy definitions for Azure API Management. These built-in policy definitions provide approaches to managing your Azure resources.
4-
ms.date: 12/13/2023
4+
ms.date: 01/02/2024
55
author: dlepow
66
ms.author: danlep
77
ms.service: api-management

articles/app-service/policy-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Built-in policy definitions for Azure App Service
33
description: Lists Azure Policy built-in policy definitions for Azure App Service. These built-in policy definitions provide common approaches to managing your Azure resources.
4-
ms.date: 12/13/2023
4+
ms.date: 01/02/2024
55
ms.topic: reference
66
ms.custom: subject-policy-reference
77
author: cephalin

articles/attestation/policy-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Built-in policy definitions for Azure Attestation
33
description: Lists Azure Policy built-in policy definitions for Azure Attestation. These built-in policy definitions provide common approaches to managing your Azure resources.
4-
ms.date: 12/13/2023
4+
ms.date: 01/02/2024
55
ms.topic: reference
66
ms.service: attestation
77
author: msmbaldwin

articles/automation/policy-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Built-in policy definitions for Azure Automation
33
description: Lists Azure Policy built-in policy definitions for Azure Automation. These built-in policy definitions provide common approaches to managing your Azure resources.
4-
ms.date: 12/13/2023
4+
ms.date: 01/02/2024
55
ms.topic: reference
66
ms.custom: subject-policy-reference
77
---

articles/azure-app-configuration/policy-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Built-in policy definitions for Azure App Configuration
33
description: Lists Azure Policy built-in policy definitions for Azure App Configuration. These built-in policy definitions provide common approaches to managing your Azure resources.
4-
ms.date: 12/13/2023
4+
ms.date: 01/02/2024
55
ms.topic: reference
66
author: maud-lv
77
ms.author: malev

articles/azure-arc/kubernetes/policy-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Built-in policy definitions for Azure Arc-enabled Kubernetes
33
description: Lists Azure Policy built-in policy definitions for Azure Arc-enabled Kubernetes. These built-in policy definitions provide common approaches to managing your Azure resources.
4-
ms.date: 12/13/2023
4+
ms.date: 01/02/2024
55
ms.service: azure-arc
66
#ms.subservice: azure-arc-kubernetes coming soon
77
ms.topic: reference

articles/azure-arc/servers/policy-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Built-in policy definitions for Azure Arc-enabled servers
33
description: Lists Azure Policy built-in policy definitions for Azure Arc-enabled servers (preview). These built-in policy definitions provide common approaches to managing your Azure resources.
4-
ms.date: 12/13/2023
4+
ms.date: 01/02/2024
55
ms.topic: reference
66
ms.custom: subject-policy-reference
77
---

0 commit comments

Comments
 (0)