Skip to content

Commit 83c3ae2

Browse files
Merge pull request #2821 from laujan/patch-3
Update v3-1-migration-guide.md
2 parents 28be008 + 4d960a3 commit 83c3ae2

File tree

3 files changed

+28
-25
lines changed

3 files changed

+28
-25
lines changed

articles/ai-services/document-intelligence/how-to-guides/includes/v4-0/python-sdk.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ import os
8080
from azure.core.credentials import AzureKeyCredential
8181
from azure.ai.documentintelligence import DocumentIntelligenceClient
8282
from azure.ai.documentintelligence.models import AnalyzeResult
83+
from azure.ai.documentintelligence.models import AnalyzeDocumentRequest
8384

8485
# use your `key` and `endpoint` environment variables
8586
key = os.environ.get('DI_KEY')
@@ -183,6 +184,7 @@ import os
183184
from azure.core.credentials import AzureKeyCredential
184185
from azure.ai.documentintelligence import DocumentIntelligenceClient
185186
from azure.ai.documentintelligence.models import AnalyzeResult
187+
from azure.ai.documentintelligence.models import AnalyzeDocumentRequest
186188

187189

188190
# use your `key` and `endpoint` environment variables
@@ -263,6 +265,7 @@ import os
263265
from azure.core.credentials import AzureKeyCredential
264266
from azure.ai.documentintelligence import DocumentIntelligenceClient
265267
from azure.ai.documentintelligence.models import AnalyzeResult
268+
from azure.ai.documentintelligence.models import AnalyzeDocumentRequest
266269

267270
# use your `key` and `endpoint` environment variables
268271
key = os.environ.get('DI_KEY')
@@ -458,6 +461,7 @@ import os
458461
from azure.core.credentials import AzureKeyCredential
459462
from azure.ai.documentintelligence import DocumentIntelligenceClient
460463
from azure.ai.documentintelligence.models import AnalyzeResult
464+
from azure.ai.documentintelligence.models import AnalyzeDocumentRequest
461465

462466
# use your `key` and `endpoint` environment variables
463467
key = os.environ.get('DI_KEY')
@@ -648,6 +652,7 @@ import os
648652
from azure.core.credentials import AzureKeyCredential
649653
from azure.ai.documentintelligence import DocumentIntelligenceClient
650654
from azure.ai.documentintelligence.models import AnalyzeResult
655+
from azure.ai.documentintelligence.models import AnalyzeDocumentRequest
651656

652657
# use your `key` and `endpoint` environment variables
653658
key = os.environ.get('DI_KEY')
@@ -740,6 +745,7 @@ import os
740745
from azure.core.credentials import AzureKeyCredential
741746
from azure.ai.documentintelligence import DocumentIntelligenceClient
742747
from azure.ai.documentintelligence.models import AnalyzeResult
748+
from azure.ai.documentintelligence.models import AnalyzeDocumentRequest
743749

744750
# use your `key` and `endpoint` environment variables
745751
key = os.environ.get('DI_KEY')

articles/ai-services/document-intelligence/quickstarts/includes/csharp-sdk.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ In this quickstart, use the following features to analyze and extract data and v
4747
* You can use the free pricing tier (`F0`) to try the service, and upgrade later to a paid tier for production.
4848

4949
> [!TIP]
50-
> Create an Azure AI services resource if you plan to access multiple Azure AI services under a single endpoint/key. For Document Intelligence access only, create a Document Intelligence resource. Please note that you'll need a single-service resource if you intend to use [Microsoft Entra authentication](/azure/active-directory/authentication/overview-authentication).
50+
> Create an Azure AI services resource if you plan to access multiple Azure AI services under a single endpoint/key. For Document Intelligence access only, create a Document Intelligence resource. You need a single-service resource if you intend to use [Microsoft Entra authentication](/azure/active-directory/authentication/overview-authentication).
5151
5252
* After your resource deploys, select **Go to resource**. You need the key and endpoint from the resource you create to connect your application to the Document Intelligence API. You paste your key and endpoint into the code later in the quickstart:
5353

@@ -62,7 +62,7 @@ In this quickstart, use the following features to analyze and extract data and v
6262
* You can use the free pricing tier (`F0`) to try the service, and upgrade later to a paid tier for production.
6363

6464
> [!TIP]
65-
> Create an Azure AI services resource if you plan to access multiple Azure AI services under a single endpoint/key. For Form Recognizer access only, create a Form Recognizer resource. Please note that you'll need a single-service resource if you intend to use [Microsoft Entra authentication](/azure/active-directory/authentication/overview-authentication).
65+
> Create an Azure AI services resource if you plan to access multiple Azure AI services under a single endpoint/key. For Form Recognizer access only, create a Form Recognizer resource. You need a single-service resource if you intend to use [Microsoft Entra authentication](/azure/active-directory/authentication/overview-authentication).
6666
6767
* After your resource deploys, select **Go to resource**. You need the key and endpoint from the resource you create to connect your application to the Form Recognizer API. You paste your key and endpoint into the code later in the quickstart:
6868

articles/ai-services/document-intelligence/versioning/v3-1-migration-guide.md

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,30 @@
11
---
22
title: "How-to: Migrate Document Intelligence applications to v3.1."
33
titleSuffix: Azure AI services
4-
description: In this how-to guide, learn the differences between Document Intelligence API v3.0 and v3.1 and how to move to the newer version of the API.
4+
description: In this how-to guide, learn the differences between Document Intelligence API versions and how to move to the newer version of the API.
55
author: laujan
66
manager: nitinme
77
ms.service: azure-ai-document-intelligence
88
ms.topic: how-to
9-
ms.date: 11/19/2024
9+
ms.date: 02/07/2025
1010
ms.author: lajanuar
11-
monikerRange: '<=doc-intel-3.1.0'
11+
monikerRange: '<=doc-intel-4.0.0'
1212
---
1313

1414
<!-- markdownlint-disable MD004 -->
15-
# Document Intelligence v3.1 migration
16-
17-
::: moniker range="<=doc-intel-3.1.0"
18-
[!INCLUDE [applies to v3.1, v3.0, and v2.1](../includes/applies-to-v40-v31-v30-v21.md)]
19-
::: moniker-end
15+
# Document Intelligence v4.0 migration
2016

2117
> [!IMPORTANT]
2218
>
23-
> Document Intelligence REST API v3.1 introduces breaking changes in the REST API request and analyze response JSON.
19+
> Document Intelligence REST API v4.0 introduces breaking changes in the REST API request and analyze response JSON.
2420
25-
## Migrating from v3.1 API version
21+
## Migrating from v3.1 to v4.0
2622

27-
Preview APIs are periodically deprecated. If you're using a preview API version, update your application to target the GA API version. To migrate from a preview API version to the `2023-11-30 (GA)` API version using the SDK, update to the [current version of the language specific SDK](sdk-overview-v3-1.md).
23+
Preview APIs are periodically deprecated. If you're using a preview API version, update your application to target the GA API version. To migrate from a preview API version to the `2024-11-30 (GA)` API version using the SDK, update to the [current version of the language specific SDK](sdk-overview-v4-0.md).
2824

2925
### Analysis features
3026

31-
| Model ID | Text Extraction | Paragraphs | Paragraph Roles | Selection Marks | Tables | Key-Value Pairs | Languages | Barcodes | Document Analysis | Formulas* | StyleFont* | OCR High Resolution* |
27+
| Model ID | Text Extraction | Paragraphs | Paragraph Roles | Selection Marks | Tables | Key-Value Pairs | Languages | Barcodes | Document Analysis | Formulas* | StyleFont* | `OCR` High Resolution* |
3228
| --- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
3329
| prebuilt-read ||| | | | | O | O | | O | O | O |
3430
| prebuilt-layout |||||| | O | O | | O | O | O |
@@ -60,7 +56,7 @@ Compared with v3.0, Document Intelligence v3.1 introduces several new features a
6056
* New document type support in [ID document](../prebuilt/id-document.md) model.
6157
* New prebuilt [Health insurance card](../prebuilt/health-insurance-card.md) model.
6258
* Office/HTML files are supported in prebuilt-read model, extracting words and paragraphs without bounding boxes. Embedded images are no longer supported. If add-on features are requested for Office/HTML files, an empty array is returned without errors.
63-
* Model expiration for custom extraction and classification models - Our new custom models build upon on a large base model that we update periodically for quality improvement. An expiration date is introduced to all custom models to enable the retirement of the corresponding base models. Once a custom model expires, you need to retrain the model using the latest API version (base model).
59+
* Model expiration for custom extraction and classification models - Our new custom models build upon on a large base model that we update periodically for quality improvement. An expiration date is introduced to all custom models to enable the retirement of the corresponding base models. Once a custom model expires, you need to retrain the model using the latest API version (base model).
6460

6561
```http
6662
GET /documentModels/{customModelId}?api-version={apiVersion}
@@ -87,8 +83,8 @@ GET /documentModels/{customModelId}?api-version={apiVersion}
8783
}
8884
```
8985

90-
* An optional `features` query parameter to Analyze operations can optionally enable specific features. Some premium features can incur added billing. Refer to [Analyze feature list](#analysis-features) for details.
91-
* Extend extracted currency field objects to output a normalized currency code field when possible. Currently, current fields can return amount (ex. 123.45) and currencySymbol (ex. $). This feature maps the currency symbol to a canonical ISO 4217 code (ex. USD). The model can optionally utilize the global document content to disambiguate or infer the currency code.
86+
* An optional `features` query parameter to Analyze operations can optionally enable specific features. Some premium features can incur added billing. Refer to [Analyze feature list](#analysis-features) for details.
87+
* Extend extracted currency field objects to output a normalized currency code field when possible. Currently, current fields can return amount (ex. 123.45) and currencySymbol (ex. $). This feature maps the currency symbol to a canonical ISO 4217 code (ex. USD). The model can optionally utilize the global document content to disambiguate or infer the currency code.
9288

9389
```http
9490
{
@@ -140,8 +136,8 @@ https://{your-form-recognizer-endpoint}/formrecognizer/documentModels/{modelId}/
140136
### Analyze operation
141137

142138
* The request payload and call pattern remain unchanged.
143-
* The Analyze operation specifies the input document and content-specific configurations, it returns the analyze result URL via the Operation-Location header in the response.
144-
* Poll this Analyze Result URL, via a GET request to check the status of the analyze operation (minimum recommended interval between requests is 1 second).
139+
* The `Analyze` operation specifies the input document and content-specific configurations, it returns the analyzed result URL via the Operation-Location header in the response.
140+
* Poll the `Analyze Result` URL, via a GET request to check the status of the `Analyze` operation (minimum recommended interval between requests is 1 second).
145141
* Upon success, status is set to succeeded and [analyzeResult](#changes-to-analyze-result) is returned in the response body. If errors are encountered, status sets to `failed`, and an error is returned.
146142

147143
| Model | v2.0 | v2.1 | v3.1 |
@@ -183,7 +179,7 @@ Base 64 encoding is also supported in Document Intelligence v3.0:
183179
Parameters that continue to be supported:
184180

185181
* `pages` : Analyze only a specific subset of pages in the document. List of page numbers indexed from the number `1` to analyze. Ex. "1-3,5,7-9"
186-
* `locale` : Locale hint for text recognition and document analysis. Value can contain only the language code (ex. `en`, `fr`) or BCP 47 language tag (ex. "en-US").
182+
* `locale` : Locale hint for text recognition and document analysis. Value can contain only the language code (ex. `en`, `fr`) or `BCP` 47 language tag (ex. "en-US").
187183

188184
Parameters no longer supported:
189185

@@ -193,7 +189,7 @@ The new response format is more compact and the full output is always returned.
193189

194190
## Changes to analyze result
195191

196-
Analyze response is refactored to the following top-level results to support multi-page elements.
192+
Analyze response is refactored to the following top-level results and supports multi-page elements.
197193

198194
* `pages`
199195
* `tables`
@@ -204,7 +200,7 @@ Analyze response is refactored to the following top-level results to support mul
204200

205201
> [!NOTE]
206202
>
207-
> The analyzeResult response changes includes a number of changes like moving up from a property of pages to a top lever property within analyzeResult.
203+
> The `analyzeResult` response changes include changes such as moving up from a property of pages to a top lever property within `analyzeResult`.
208204
209205
```json
210206

@@ -373,7 +369,7 @@ POST https://{your-form-recognizer-endpoint}/formrecognizer/documentModels:compo
373369
The call pattern for copy model remains unchanged:
374370

375371
* Authorize the copy operation with the target resource calling ```authorizeCopy```. Now a POST request.
376-
* Submit the authorization to the source resource to copy the model calling ```copyTo```
372+
* Submit the authorization to the source resource and copy the model calling ```copyTo```
377373
* Poll the returned operation to validate the operation completed successfully
378374

379375
The only changes to the copy model function are:
@@ -415,9 +411,9 @@ List models are extended to now return prebuilt and custom models. All prebuilt
415411
GET https://{your-form-recognizer-endpoint}/formrecognizer/documentModels?api-version=2022-08-31
416412
```
417413

418-
## Change to get model
414+
## Change to get model operation
419415

420-
As get model now includes prebuilt models, the get operation returns a ```docTypes``` dictionary. Each document type description includes name, optional description, field schema, and optional field confidence. The field schema describes the list of fields potentially returned with the document type.
416+
As `Get Model` now includes prebuilt models, the `Get` operation returns a ```docTypes``` dictionary. Each document type description includes name, optional description, field schema, and optional field confidence. The field schema describes the list of fields potentially returned with the document type.
421417

422418
```json
423419
GET https://{your-form-recognizer-endpoint}/formrecognizer/documentModels/{modelId}?api-version=2022-08-31
@@ -447,3 +443,4 @@ GET https://{your-form-recognizer-endpoint}/formrecognizer/info? api-version=202
447443
* [Review the new REST API](/rest/api/aiservices/document-models/analyze-document?view=rest-aiservices-2023-07-31&preserve-view=true&tabs=HTTP)
448444
* [What is Document Intelligence?](../overview.md)
449445
* [Document Intelligence quickstart](../quickstarts/get-started-sdks-rest-api.md)
446+
0

0 commit comments

Comments
 (0)