diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_recognizer_client.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_recognizer_client.py index 31b12cbcf5a3..34851011189e 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_recognizer_client.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_recognizer_client.py @@ -775,9 +775,9 @@ def begin_recognize_custom_forms(self, model_id, form, **kwargs): include_field_elements = kwargs.pop("include_field_elements", False) - polling=LROBasePolling( - timeout=polling_interval, lro_algorithms=[AnalyzePolling()], **kwargs - ) + polling = LROBasePolling( + timeout=polling_interval, lro_algorithms=[AnalyzePolling()], **kwargs + ) # FIXME: part of this code will be removed once autorest can handle diff mixin # signatures across API versions @@ -843,9 +843,9 @@ def begin_recognize_custom_forms_from_url(self, model_id, form_url, **kwargs): "polling_interval", self._client._config.polling_interval ) - polling=LROBasePolling( - timeout=polling_interval, lro_algorithms=[AnalyzePolling()], **kwargs - ) + polling = LROBasePolling( + timeout=polling_interval, lro_algorithms=[AnalyzePolling()], **kwargs + ) # FIXME: part of this code will be removed once autorest can handle diff mixin # signatures across API versions diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_recognizer_client_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_recognizer_client_async.py index 8fdbf5ef3b86..898dbdf7763c 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_recognizer_client_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_recognizer_client_async.py @@ -789,9 +789,9 @@ async def begin_recognize_custom_forms( pages = kwargs.pop("pages", None) include_field_elements = kwargs.pop("include_field_elements", False) - polling=AsyncLROBasePolling( - timeout=polling_interval, lro_algorithms=[AnalyzePolling()], **kwargs - ) + polling = AsyncLROBasePolling( + timeout=polling_interval, lro_algorithms=[AnalyzePolling()], **kwargs + ) # FIXME: part of this code will be removed once autorest can handle diff mixin # signatures across API versions @@ -858,9 +858,9 @@ async def begin_recognize_custom_forms_from_url( continuation_token = kwargs.pop("continuation_token", None) include_field_elements = kwargs.pop("include_field_elements", False) - polling=AsyncLROBasePolling( - timeout=polling_interval, lro_algorithms=[AnalyzePolling()], **kwargs - ) + polling = AsyncLROBasePolling( + timeout=polling_interval, lro_algorithms=[AnalyzePolling()], **kwargs + ) # FIXME: part of this code will be removed once autorest can handle diff mixin # signatures across API versions diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_business_card.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_business_card.test_pages_kwarg_specified.yaml new file mode 100644 index 000000000000..6c75b24dee43 --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_business_card.test_pages_kwarg_specified.yaml @@ -0,0 +1,112 @@ +interactions: +- request: + body: '!!! The request body has been omitted from the recording because its size + 915108 is larger than 128KB. !!!' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '915108' + Content-Type: + - image/jpeg + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/businessCard/analyze?includeTextDetails=false&pages=1 + response: + body: + string: '' + headers: + apim-request-id: + - e800b802-37c0-46c9-9381-7f3670e3e8e4 + content-length: + - '0' + date: + - Thu, 11 Mar 2021 17:47:07 GMT + operation-location: + - https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/businessCard/analyzeResults/e800b802-37c0-46c9-9381-7f3670e3e8e4 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '454' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/businessCard/analyzeResults/e800b802-37c0-46c9-9381-7f3670e3e8e4 + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-03-11T17:47:07Z", + "lastUpdatedDateTime": "2021-03-11T17:47:11Z", "analyzeResult": {"version": + "2.1.0", "readResults": [{"page": 1, "angle": -16.6836, "width": 4032, "height": + 3024, "unit": "pixel"}], "documentResults": [{"docType": "prebuilt:businesscard", + "pageRange": [1, 1], "fields": {"Addresses": {"type": "array", "valueArray": + [{"type": "string", "valueString": "2 Kingdom Street Paddington, London, W2 + 6BD", "text": "2 Kingdom Street Paddington, London, W2 6BD", "boundingBox": + [1227.3, 2138.3, 2520.2, 1690.5, 2597, 1912.3, 1304.1, 2360.1], "page": 1, + "confidence": 0.98}]}, "CompanyNames": {"type": "array", "valueArray": [{"type": + "string", "valueString": "Contoso", "text": "Contoso", "boundingBox": [1146, + 1926, 2224, 1587, 2285, 1756, 1202, 2099], "page": 1, "confidence": 0.168}]}, + "ContactNames": {"type": "array", "valueArray": [{"type": "object", "valueObject": + {"FirstName": {"type": "string", "valueString": "Avery", "text": "Avery", + "boundingBox": [666, 1102, 1111, 995, 1140, 1114, 696, 1216], "page": 1}, + "LastName": {"type": "string", "valueString": "Smith", "text": "Smith", "boundingBox": + [1170, 981, 1571, 881, 1600, 1000, 1200, 1100], "page": 1}}, "text": "Dr. + Avery Smith", "boundingBox": [414.1, 1153, 1572, 880.8, 1601.3, 1005.6, 443.5, + 1277.9], "page": 1, "confidence": 0.979}]}, "Departments": {"type": "array", + "valueArray": [{"type": "string", "valueString": "Cloud & Al Department", + "text": "Cloud & Al Department", "boundingBox": [473.6, 1409.5, 1586, 1134, + 1607.3, 1219.8, 494.9, 1495.3], "page": 1, "confidence": 0.989}]}, "Emails": + {"type": "array", "valueArray": [{"type": "string", "valueString": "avery.smith@contoso.com", + "text": "avery.smith@contoso.com", "boundingBox": [2106, 934, 2908, 706, 2921, + 769, 2122, 993], "page": 1, "confidence": 0.99}]}, "Faxes": {"type": "array", + "valueArray": [{"type": "phoneNumber", "text": "+44 (0) 20 6789 2345", "boundingBox": + [2520.4, 1195.5, 3191.8, 983.5, 3215.8, 1059.2, 2544.3, 1271.3], "page": 1, + "confidence": 0.99}]}, "JobTitles": {"type": "array", "valueArray": [{"type": + "string", "valueString": "Senior Researcher", "text": "Senior Researcher", + "boundingBox": [451, 1312, 1315.9, 1103.6, 1334.7, 1181.7, 469.8, 1390], "page": + 1, "confidence": 0.99}]}, "MobilePhones": {"type": "array", "valueArray": + [{"type": "phoneNumber", "text": "+44 (0) 7911 123456", "boundingBox": [2426.8, + 1040.1, 3065.5, 846, 3087.2, 917.6, 2448.5, 1111.7], "page": 1, "confidence": + 0.99}]}, "Websites": {"type": "array", "valueArray": [{"type": "string", "valueString": + "https://www.contoso.com/", "text": "https://www.contoso.com/", "boundingBox": + [2120, 1003, 2981, 757, 3006, 824, 2139, 1075], "page": 1, "confidence": 0.99}]}, + "WorkPhones": {"type": "array", "valueArray": [{"type": "phoneNumber", "text": + "+44 (0) 20 9876 5432", "boundingBox": [2468.2, 1118.1, 3130.3, 914.6, 3152.9, + 988.2, 2490.8, 1191.6], "page": 1, "confidence": 0.989}]}}}]}}' + headers: + apim-request-id: + - 1b20e12c-ddd7-4ca4-80bc-35b899311ddd + content-length: + - '2684' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 17:47:12 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '18' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_business_card_async.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_business_card_async.test_pages_kwarg_specified.yaml new file mode 100644 index 000000000000..689bdba02491 --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_business_card_async.test_pages_kwarg_specified.yaml @@ -0,0 +1,88 @@ +interactions: +- request: + body: '!!! The request body has been omitted from the recording because its size + 915108 is larger than 128KB. !!!' + headers: + Accept: + - application/json + Content-Type: + - image/jpeg + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/businessCard/analyze?includeTextDetails=false&pages=1 + response: + body: + string: '' + headers: + apim-request-id: 7db70dd9-42a8-4d0b-bfbf-259d1479f219 + content-length: '0' + date: Thu, 11 Mar 2021 17:44:13 GMT + operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/businessCard/analyzeResults/7db70dd9-42a8-4d0b-bfbf-259d1479f219 + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '575' + status: + code: 202 + message: Accepted + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/businessCard/analyze?includeTextDetails=false&pages=1 +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/businessCard/analyzeResults/7db70dd9-42a8-4d0b-bfbf-259d1479f219 + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-03-11T17:44:13Z", + "lastUpdatedDateTime": "2021-03-11T17:44:15Z", "analyzeResult": {"version": + "2.1.0", "readResults": [{"page": 1, "angle": -16.6836, "width": 4032, "height": + 3024, "unit": "pixel"}], "documentResults": [{"docType": "prebuilt:businesscard", + "pageRange": [1, 1], "fields": {"Addresses": {"type": "array", "valueArray": + [{"type": "string", "valueString": "2 Kingdom Street Paddington, London, W2 + 6BD", "text": "2 Kingdom Street Paddington, London, W2 6BD", "boundingBox": + [1227.3, 2138.3, 2520.2, 1690.5, 2597, 1912.3, 1304.1, 2360.1], "page": 1, + "confidence": 0.98}]}, "CompanyNames": {"type": "array", "valueArray": [{"type": + "string", "valueString": "Contoso", "text": "Contoso", "boundingBox": [1146, + 1926, 2224, 1587, 2285, 1756, 1202, 2099], "page": 1, "confidence": 0.168}]}, + "ContactNames": {"type": "array", "valueArray": [{"type": "object", "valueObject": + {"FirstName": {"type": "string", "valueString": "Avery", "text": "Avery", + "boundingBox": [666, 1102, 1111, 995, 1140, 1114, 696, 1216], "page": 1}, + "LastName": {"type": "string", "valueString": "Smith", "text": "Smith", "boundingBox": + [1170, 981, 1571, 881, 1600, 1000, 1200, 1100], "page": 1}}, "text": "Dr. + Avery Smith", "boundingBox": [414.1, 1153, 1572, 880.8, 1601.3, 1005.6, 443.5, + 1277.9], "page": 1, "confidence": 0.979}]}, "Departments": {"type": "array", + "valueArray": [{"type": "string", "valueString": "Cloud & Al Department", + "text": "Cloud & Al Department", "boundingBox": [473.6, 1409.5, 1586, 1134, + 1607.3, 1219.8, 494.9, 1495.3], "page": 1, "confidence": 0.989}]}, "Emails": + {"type": "array", "valueArray": [{"type": "string", "valueString": "avery.smith@contoso.com", + "text": "avery.smith@contoso.com", "boundingBox": [2106, 934, 2908, 706, 2921, + 769, 2122, 993], "page": 1, "confidence": 0.99}]}, "Faxes": {"type": "array", + "valueArray": [{"type": "phoneNumber", "text": "+44 (0) 20 6789 2345", "boundingBox": + [2520.4, 1195.5, 3191.8, 983.5, 3215.8, 1059.2, 2544.3, 1271.3], "page": 1, + "confidence": 0.99}]}, "JobTitles": {"type": "array", "valueArray": [{"type": + "string", "valueString": "Senior Researcher", "text": "Senior Researcher", + "boundingBox": [451, 1312, 1315.9, 1103.6, 1334.7, 1181.7, 469.8, 1390], "page": + 1, "confidence": 0.99}]}, "MobilePhones": {"type": "array", "valueArray": + [{"type": "phoneNumber", "text": "+44 (0) 7911 123456", "boundingBox": [2426.8, + 1040.1, 3065.5, 846, 3087.2, 917.6, 2448.5, 1111.7], "page": 1, "confidence": + 0.99}]}, "Websites": {"type": "array", "valueArray": [{"type": "string", "valueString": + "https://www.contoso.com/", "text": "https://www.contoso.com/", "boundingBox": + [2120, 1003, 2981, 757, 3006, 824, 2139, 1075], "page": 1, "confidence": 0.99}]}, + "WorkPhones": {"type": "array", "valueArray": [{"type": "phoneNumber", "text": + "+44 (0) 20 9876 5432", "boundingBox": [2468.2, 1118.1, 3130.3, 914.6, 3152.9, + 988.2, 2490.8, 1191.6], "page": 1, "confidence": 0.989}]}}}]}}' + headers: + apim-request-id: 6ca0080a-fc15-4cde-af36-878fb149a563 + content-length: '2684' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 17:44:18 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '19' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/businessCard/analyzeResults/7db70dd9-42a8-4d0b-bfbf-259d1479f219 +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_business_card_from_url.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_business_card_from_url.test_pages_kwarg_specified.yaml new file mode 100644 index 000000000000..fe4065977724 --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_business_card_from_url.test_pages_kwarg_specified.yaml @@ -0,0 +1,111 @@ +interactions: +- request: + body: 'b''{"source": "blob_sas_url"}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '229' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/businessCard/analyze?includeTextDetails=false&pages=1 + response: + body: + string: '' + headers: + apim-request-id: + - b700df9f-5fdc-4269-b408-e165ae09080a + content-length: + - '0' + date: + - Thu, 11 Mar 2021 17:46:21 GMT + operation-location: + - https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/businessCard/analyzeResults/b700df9f-5fdc-4269-b408-e165ae09080a + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '982' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/businessCard/analyzeResults/b700df9f-5fdc-4269-b408-e165ae09080a + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-03-11T17:46:21Z", + "lastUpdatedDateTime": "2021-03-11T17:46:24Z", "analyzeResult": {"version": + "2.1.0", "readResults": [{"page": 1, "angle": -16.6836, "width": 4032, "height": + 3024, "unit": "pixel"}], "documentResults": [{"docType": "prebuilt:businesscard", + "pageRange": [1, 1], "fields": {"Addresses": {"type": "array", "valueArray": + [{"type": "string", "valueString": "2 Kingdom Street Paddington, London, W2 + 6BD", "text": "2 Kingdom Street Paddington, London, W2 6BD", "boundingBox": + [1227.3, 2138.3, 2520.2, 1690.5, 2597, 1912.3, 1304.1, 2360.1], "page": 1, + "confidence": 0.98}]}, "CompanyNames": {"type": "array", "valueArray": [{"type": + "string", "valueString": "Contoso", "text": "Contoso", "boundingBox": [1146, + 1926, 2224, 1587, 2285, 1756, 1202, 2099], "page": 1, "confidence": 0.168}]}, + "ContactNames": {"type": "array", "valueArray": [{"type": "object", "valueObject": + {"FirstName": {"type": "string", "valueString": "Avery", "text": "Avery", + "boundingBox": [666, 1102, 1111, 995, 1140, 1114, 696, 1216], "page": 1}, + "LastName": {"type": "string", "valueString": "Smith", "text": "Smith", "boundingBox": + [1170, 981, 1571, 881, 1600, 1000, 1200, 1100], "page": 1}}, "text": "Dr. + Avery Smith", "boundingBox": [414.1, 1153, 1572, 880.8, 1601.3, 1005.6, 443.5, + 1277.9], "page": 1, "confidence": 0.979}]}, "Departments": {"type": "array", + "valueArray": [{"type": "string", "valueString": "Cloud & Al Department", + "text": "Cloud & Al Department", "boundingBox": [473.6, 1409.5, 1586, 1134, + 1607.3, 1219.8, 494.9, 1495.3], "page": 1, "confidence": 0.989}]}, "Emails": + {"type": "array", "valueArray": [{"type": "string", "valueString": "avery.smith@contoso.com", + "text": "avery.smith@contoso.com", "boundingBox": [2106, 934, 2908, 706, 2921, + 769, 2122, 993], "page": 1, "confidence": 0.99}]}, "Faxes": {"type": "array", + "valueArray": [{"type": "phoneNumber", "text": "+44 (0) 20 6789 2345", "boundingBox": + [2520.4, 1195.5, 3191.8, 983.5, 3215.8, 1059.2, 2544.3, 1271.3], "page": 1, + "confidence": 0.99}]}, "JobTitles": {"type": "array", "valueArray": [{"type": + "string", "valueString": "Senior Researcher", "text": "Senior Researcher", + "boundingBox": [451, 1312, 1315.9, 1103.6, 1334.7, 1181.7, 469.8, 1390], "page": + 1, "confidence": 0.99}]}, "MobilePhones": {"type": "array", "valueArray": + [{"type": "phoneNumber", "text": "+44 (0) 7911 123456", "boundingBox": [2426.8, + 1040.1, 3065.5, 846, 3087.2, 917.6, 2448.5, 1111.7], "page": 1, "confidence": + 0.99}]}, "Websites": {"type": "array", "valueArray": [{"type": "string", "valueString": + "https://www.contoso.com/", "text": "https://www.contoso.com/", "boundingBox": + [2120, 1003, 2981, 757, 3006, 824, 2139, 1075], "page": 1, "confidence": 0.99}]}, + "WorkPhones": {"type": "array", "valueArray": [{"type": "phoneNumber", "text": + "+44 (0) 20 9876 5432", "boundingBox": [2468.2, 1118.1, 3130.3, 914.6, 3152.9, + 988.2, 2490.8, 1191.6], "page": 1, "confidence": 0.989}]}}}]}}' + headers: + apim-request-id: + - 2ba20771-b431-4590-a7eb-d55484d753a7 + content-length: + - '2684' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 17:46:26 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '19' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_business_card_from_url_async.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_business_card_from_url_async.test_pages_kwarg_specified.yaml new file mode 100644 index 000000000000..160a952873b4 --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_business_card_from_url_async.test_pages_kwarg_specified.yaml @@ -0,0 +1,89 @@ +interactions: +- request: + body: 'b''{"source": "blob_sas_url"}''' + headers: + Accept: + - application/json + Content-Length: + - '229' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/businessCard/analyze?includeTextDetails=false&pages=1 + response: + body: + string: '' + headers: + apim-request-id: b3f85d14-06d8-41ce-9d2c-507c68985b97 + content-length: '0' + date: Thu, 11 Mar 2021 17:43:34 GMT + operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/businessCard/analyzeResults/b3f85d14-06d8-41ce-9d2c-507c68985b97 + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '1315' + status: + code: 202 + message: Accepted + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/businessCard/analyze?includeTextDetails=false&pages=1 +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/businessCard/analyzeResults/b3f85d14-06d8-41ce-9d2c-507c68985b97 + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-03-11T17:43:35Z", + "lastUpdatedDateTime": "2021-03-11T17:43:37Z", "analyzeResult": {"version": + "2.1.0", "readResults": [{"page": 1, "angle": -16.6836, "width": 4032, "height": + 3024, "unit": "pixel"}], "documentResults": [{"docType": "prebuilt:businesscard", + "pageRange": [1, 1], "fields": {"Addresses": {"type": "array", "valueArray": + [{"type": "string", "valueString": "2 Kingdom Street Paddington, London, W2 + 6BD", "text": "2 Kingdom Street Paddington, London, W2 6BD", "boundingBox": + [1227.3, 2138.3, 2520.2, 1690.5, 2597, 1912.3, 1304.1, 2360.1], "page": 1, + "confidence": 0.98}]}, "CompanyNames": {"type": "array", "valueArray": [{"type": + "string", "valueString": "Contoso", "text": "Contoso", "boundingBox": [1146, + 1926, 2224, 1587, 2285, 1756, 1202, 2099], "page": 1, "confidence": 0.168}]}, + "ContactNames": {"type": "array", "valueArray": [{"type": "object", "valueObject": + {"FirstName": {"type": "string", "valueString": "Avery", "text": "Avery", + "boundingBox": [666, 1102, 1111, 995, 1140, 1114, 696, 1216], "page": 1}, + "LastName": {"type": "string", "valueString": "Smith", "text": "Smith", "boundingBox": + [1170, 981, 1571, 881, 1600, 1000, 1200, 1100], "page": 1}}, "text": "Dr. + Avery Smith", "boundingBox": [414.1, 1153, 1572, 880.8, 1601.3, 1005.6, 443.5, + 1277.9], "page": 1, "confidence": 0.979}]}, "Departments": {"type": "array", + "valueArray": [{"type": "string", "valueString": "Cloud & Al Department", + "text": "Cloud & Al Department", "boundingBox": [473.6, 1409.5, 1586, 1134, + 1607.3, 1219.8, 494.9, 1495.3], "page": 1, "confidence": 0.989}]}, "Emails": + {"type": "array", "valueArray": [{"type": "string", "valueString": "avery.smith@contoso.com", + "text": "avery.smith@contoso.com", "boundingBox": [2106, 934, 2908, 706, 2921, + 769, 2122, 993], "page": 1, "confidence": 0.99}]}, "Faxes": {"type": "array", + "valueArray": [{"type": "phoneNumber", "text": "+44 (0) 20 6789 2345", "boundingBox": + [2520.4, 1195.5, 3191.8, 983.5, 3215.8, 1059.2, 2544.3, 1271.3], "page": 1, + "confidence": 0.99}]}, "JobTitles": {"type": "array", "valueArray": [{"type": + "string", "valueString": "Senior Researcher", "text": "Senior Researcher", + "boundingBox": [451, 1312, 1315.9, 1103.6, 1334.7, 1181.7, 469.8, 1390], "page": + 1, "confidence": 0.99}]}, "MobilePhones": {"type": "array", "valueArray": + [{"type": "phoneNumber", "text": "+44 (0) 7911 123456", "boundingBox": [2426.8, + 1040.1, 3065.5, 846, 3087.2, 917.6, 2448.5, 1111.7], "page": 1, "confidence": + 0.99}]}, "Websites": {"type": "array", "valueArray": [{"type": "string", "valueString": + "https://www.contoso.com/", "text": "https://www.contoso.com/", "boundingBox": + [2120, 1003, 2981, 757, 3006, 824, 2139, 1075], "page": 1, "confidence": 0.99}]}, + "WorkPhones": {"type": "array", "valueArray": [{"type": "phoneNumber", "text": + "+44 (0) 20 9876 5432", "boundingBox": [2468.2, 1118.1, 3130.3, 914.6, 3152.9, + 988.2, 2490.8, 1191.6], "page": 1, "confidence": 0.989}]}}}]}}' + headers: + apim-request-id: ec0dd0ae-eec1-44ae-abee-3b4c51fca967 + content-length: '2684' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 17:43:39 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '16' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/businessCard/analyzeResults/b3f85d14-06d8-41ce-9d2c-507c68985b97 +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_content.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_content.test_pages_kwarg_specified.yaml new file mode 100644 index 000000000000..63712aa42809 --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_content.test_pages_kwarg_specified.yaml @@ -0,0 +1,428 @@ +interactions: +- request: + body: '!!! The request body has been omitted from the recording because its size + 479269 is larger than 128KB. !!!' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '479269' + Content-Type: + - image/jpeg + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/layout/analyze?pages=1&readingOrder=basic + response: + body: + string: '' + headers: + apim-request-id: + - 0d71a2da-1db6-4955-8d42-b79ac6bbac29 + content-length: + - '0' + date: + - Thu, 11 Mar 2021 17:48:58 GMT + operation-location: + - https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/layout/analyzeResults/0d71a2da-1db6-4955-8d42-b79ac6bbac29 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '91' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/layout/analyzeResults/0d71a2da-1db6-4955-8d42-b79ac6bbac29 + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-03-11T17:48:58Z", + "lastUpdatedDateTime": "2021-03-11T17:49:02Z", "analyzeResult": {"version": + "2.1.0", "readResults": [{"page": 1, "angle": 0, "width": 1700, "height": + 2200, "unit": "pixel", "lines": [{"boundingBox": [136, 139, 351, 138, 351, + 166, 136, 166], "text": "Purchase Order", "appearance": {"style": {"name": + "other", "confidence": 0.878}}, "words": [{"boundingBox": [137, 140, 259, + 139, 259, 167, 137, 167], "text": "Purchase", "confidence": 0.995}, {"boundingBox": + [265, 139, 350, 139, 350, 167, 265, 167], "text": "Order", "confidence": 0.996}]}, + {"boundingBox": [620, 205, 1074, 204, 1075, 265, 620, 266], "text": "Hero + Limited", "appearance": {"style": {"name": "other", "confidence": 0.878}}, + "words": [{"boundingBox": [621, 208, 773, 206, 772, 266, 620, 266], "text": + "Hero", "confidence": 0.994}, {"boundingBox": [797, 205, 1062, 205, 1061, + 266, 796, 266], "text": "Limited", "confidence": 0.996}]}, {"boundingBox": + [1112, 321, 1554, 321, 1554, 369, 1112, 369], "text": "Purchase Order", "appearance": + {"style": {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": + [1113, 322, 1367, 321, 1367, 370, 1113, 368], "text": "Purchase", "confidence": + 0.995}, {"boundingBox": [1386, 321, 1550, 321, 1549, 370, 1386, 370], "text": + "Order", "confidence": 0.996}]}, {"boundingBox": [163, 352, 528, 350, 528, + 376, 163, 379], "text": "Company Phone: 555-348-6512", "appearance": {"style": + {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": [163, 353, + 272, 351, 273, 379, 164, 378], "text": "Company", "confidence": 0.996}, {"boundingBox": + [277, 351, 360, 351, 361, 378, 278, 379], "text": "Phone:", "confidence": + 0.992}, {"boundingBox": [365, 351, 525, 351, 525, 374, 366, 378], "text": + "555-348-6512", "confidence": 0.994}]}, {"boundingBox": [166, 393, 533, 393, + 533, 418, 166, 418], "text": "Website: www.herolimited.com", "appearance": + {"style": {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": + [167, 394, 268, 393, 268, 418, 167, 417], "text": "Website:", "confidence": + 0.995}, {"boundingBox": [273, 393, 524, 393, 524, 418, 273, 418], "text": + "www.herolimited.com", "confidence": 0.982}]}, {"boundingBox": [165, 435, + 237, 435, 237, 460, 165, 460], "text": "Email:", "appearance": {"style": {"name": + "other", "confidence": 0.878}}, "words": [{"boundingBox": [165, 435, 237, + 435, 237, 460, 165, 460], "text": "Email:", "confidence": 0.994}]}, {"boundingBox": + [1024, 419, 1317, 420, 1317, 448, 1024, 448], "text": "Dated As: 12/20/2020", + "appearance": {"style": {"name": "other", "confidence": 0.878}}, "words": + [{"boundingBox": [1025, 421, 1104, 420, 1104, 448, 1025, 448], "text": "Dated", + "confidence": 0.994}, {"boundingBox": [1112, 420, 1158, 420, 1158, 448, 1112, + 448], "text": "As:", "confidence": 0.998}, {"boundingBox": [1163, 420, 1310, + 421, 1310, 449, 1163, 448], "text": "12/20/2020", "confidence": 0.986}]}, + {"boundingBox": [164, 479, 482, 478, 483, 502, 164, 503], "text": "accounts@herolimited.com", + "appearance": {"style": {"name": "other", "confidence": 0.878}}, "words": + [{"boundingBox": [164, 481, 471, 479, 470, 503, 165, 503], "text": "accounts@herolimited.com", + "confidence": 0.965}]}, {"boundingBox": [1023, 461, 1376, 461, 1376, 489, + 1023, 488], "text": "Purchase Order #: 948284", "appearance": {"style": {"name": + "other", "confidence": 0.878}}, "words": [{"boundingBox": [1023, 461, 1149, + 461, 1150, 489, 1023, 488], "text": "Purchase", "confidence": 0.995}, {"boundingBox": + [1155, 461, 1238, 461, 1238, 489, 1155, 489], "text": "Order", "confidence": + 0.996}, {"boundingBox": [1243, 461, 1273, 461, 1273, 489, 1243, 489], "text": + "#:", "confidence": 0.964}, {"boundingBox": [1278, 461, 1371, 462, 1372, 489, + 1279, 489], "text": "948284", "confidence": 0.996}]}, {"boundingBox": [167, + 547, 397, 546, 397, 591, 167, 592], "text": "Shipped To", "appearance": {"style": + {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": [167, 547, + 328, 547, 328, 592, 168, 592], "text": "Shipped", "confidence": 0.996}, {"boundingBox": + [341, 547, 392, 547, 391, 591, 340, 592], "text": "To", "confidence": 0.994}]}, + {"boundingBox": [159, 609, 520, 609, 520, 638, 159, 638], "text": "Vendor + Name: Hillary Swank", "appearance": {"style": {"name": "other", "confidence": + 0.878}}, "words": [{"boundingBox": [160, 611, 252, 610, 251, 638, 160, 637], + "text": "Vendor", "confidence": 0.996}, {"boundingBox": [257, 610, 344, 609, + 344, 639, 257, 638], "text": "Name:", "confidence": 0.996}, {"boundingBox": + [349, 609, 431, 609, 431, 639, 349, 639], "text": "Hillary", "confidence": + 0.996}, {"boundingBox": [436, 609, 520, 610, 519, 639, 436, 639], "text": + "Swank", "confidence": 0.996}]}, {"boundingBox": [159, 647, 629, 646, 629, + 677, 160, 679], "text": "Company Name: Higgly Wiggly Books", "appearance": + {"style": {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": + [160, 649, 278, 647, 279, 678, 161, 676], "text": "Company", "confidence": + 0.996}, {"boundingBox": [283, 647, 369, 647, 369, 679, 284, 678], "text": + "Name:", "confidence": 0.996}, {"boundingBox": [375, 647, 453, 646, 453, 679, + 375, 679], "text": "Higgly", "confidence": 0.996}, {"boundingBox": [459, 646, + 544, 646, 544, 678, 458, 679], "text": "Wiggly", "confidence": 0.996}, {"boundingBox": + [550, 646, 629, 646, 628, 676, 549, 678], "text": "Books", "confidence": 0.996}]}, + {"boundingBox": [160, 684, 526, 684, 526, 712, 160, 711], "text": "Address: + 938 NE Burner Road", "appearance": {"style": {"name": "other", "confidence": + 0.878}}, "words": [{"boundingBox": [161, 685, 270, 685, 269, 712, 160, 711], + "text": "Address:", "confidence": 0.994}, {"boundingBox": [275, 685, 321, + 685, 320, 713, 275, 712], "text": "938", "confidence": 0.998}, {"boundingBox": + [327, 685, 363, 685, 362, 713, 326, 713], "text": "NE", "confidence": 0.996}, + {"boundingBox": [368, 685, 455, 685, 454, 713, 367, 713], "text": "Burner", + "confidence": 0.996}, {"boundingBox": [460, 685, 523, 685, 522, 713, 459, + 713], "text": "Road", "confidence": 0.994}]}, {"boundingBox": [279, 722, 566, + 721, 566, 750, 279, 751], "text": "Boulder City, CO 92848", "appearance": + {"style": {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": + [279, 722, 371, 722, 372, 751, 280, 750], "text": "Boulder", "confidence": + 0.996}, {"boundingBox": [376, 722, 433, 722, 433, 751, 377, 751], "text": + "City,", "confidence": 0.996}, {"boundingBox": [438, 722, 474, 722, 474, 751, + 438, 751], "text": "CO", "confidence": 0.997}, {"boundingBox": [483, 722, + 561, 722, 560, 749, 483, 751], "text": "92848", "confidence": 0.996}]}, {"boundingBox": + [612, 721, 885, 721, 885, 747, 612, 748], "text": "Phone: 938-294-2949", "appearance": + {"style": {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": + [613, 722, 704, 722, 704, 749, 613, 749], "text": "Phone:", "confidence": + 0.994}, {"boundingBox": [709, 722, 882, 722, 882, 748, 709, 749], "text": + "938-294-2949", "confidence": 0.994}]}, {"boundingBox": [167, 784, 453, 784, + 453, 829, 167, 830], "text": "Shipped From", "appearance": {"style": {"name": + "other", "confidence": 0.878}}, "words": [{"boundingBox": [167, 784, 328, + 785, 329, 830, 169, 830], "text": "Shipped", "confidence": 0.996}, {"boundingBox": + [338, 785, 435, 785, 434, 827, 338, 830], "text": "From", "confidence": 0.994}]}, + {"boundingBox": [165, 852, 445, 851, 445, 878, 165, 879], "text": "Name: Bernie + Sanders", "appearance": {"style": {"name": "other", "confidence": 0.878}}, + "words": [{"boundingBox": [166, 853, 248, 853, 248, 879, 166, 879], "text": + "Name:", "confidence": 0.986}, {"boundingBox": [253, 853, 337, 852, 337, 880, + 253, 879], "text": "Bernie", "confidence": 0.996}, {"boundingBox": [342, 852, + 445, 852, 445, 879, 342, 880], "text": "Sanders", "confidence": 0.996}]}, + {"boundingBox": [164, 889, 629, 889, 629, 919, 164, 919], "text": "Company + Name: Jupiter Book Supply", "appearance": {"style": {"name": "other", "confidence": + 0.878}}, "words": [{"boundingBox": [164, 890, 282, 890, 283, 919, 165, 919], + "text": "Company", "confidence": 0.996}, {"boundingBox": [288, 890, 373, 889, + 374, 919, 289, 919], "text": "Name:", "confidence": 0.996}, {"boundingBox": + [379, 889, 467, 889, 467, 919, 380, 919], "text": "Jupiter", "confidence": + 0.996}, {"boundingBox": [473, 889, 538, 889, 538, 920, 473, 919], "text": + "Book", "confidence": 0.994}, {"boundingBox": [543, 889, 630, 890, 629, 920, + 543, 920], "text": "Supply", "confidence": 0.996}]}, {"boundingBox": [165, + 925, 521, 926, 521, 953, 165, 952], "text": "Address: 383 N Kinnick Road", + "appearance": {"style": {"name": "other", "confidence": 0.878}}, "words": + [{"boundingBox": [166, 926, 275, 925, 274, 953, 166, 953], "text": "Address:", + "confidence": 0.994}, {"boundingBox": [280, 925, 325, 925, 324, 953, 280, + 953], "text": "383", "confidence": 0.998}, {"boundingBox": [330, 925, 345, + 926, 345, 953, 330, 953], "text": "N", "confidence": 0.995}, {"boundingBox": + [358, 926, 448, 926, 447, 954, 357, 953], "text": "Kinnick", "confidence": + 0.995}, {"boundingBox": [453, 926, 516, 927, 516, 954, 452, 954], "text": + "Road", "confidence": 0.994}]}, {"boundingBox": [280, 963, 514, 962, 514, + 990, 281, 991], "text": "Seattle, WA 38383", "appearance": {"style": {"name": + "other", "confidence": 0.878}}, "words": [{"boundingBox": [282, 965, 376, + 964, 377, 991, 284, 991], "text": "Seattle,", "confidence": 0.994}, {"boundingBox": + [382, 964, 425, 964, 425, 991, 383, 991], "text": "WA", "confidence": 0.998}, + {"boundingBox": [435, 964, 513, 962, 514, 990, 436, 991], "text": "38383", + "confidence": 0.996}]}, {"boundingBox": [760, 963, 1032, 963, 1032, 989, 760, + 990], "text": "Phone: 932-299-0292", "appearance": {"style": {"name": "other", + "confidence": 0.878}}, "words": [{"boundingBox": [760, 964, 849, 964, 848, + 990, 760, 990], "text": "Phone:", "confidence": 0.996}, {"boundingBox": [854, + 964, 1028, 963, 1027, 990, 854, 990], "text": "932-299-0292", "confidence": + 0.994}]}, {"boundingBox": [446, 1047, 558, 1047, 558, 1077, 446, 1077], "text": + "Details", "appearance": {"style": {"name": "other", "confidence": 0.878}}, + "words": [{"boundingBox": [447, 1048, 557, 1048, 557, 1077, 446, 1078], "text": + "Details", "confidence": 0.994}]}, {"boundingBox": [885, 1047, 1034, 1047, + 1034, 1083, 886, 1083], "text": "Quantity", "appearance": {"style": {"name": + "other", "confidence": 0.878}}, "words": [{"boundingBox": [886, 1048, 1030, + 1047, 1030, 1084, 886, 1084], "text": "Quantity", "confidence": 0.994}]}, + {"boundingBox": [1111, 1047, 1270, 1047, 1269, 1078, 1111, 1077], "text": + "Unit Price", "appearance": {"style": {"name": "other", "confidence": 0.878}}, + "words": [{"boundingBox": [1112, 1047, 1179, 1047, 1178, 1078, 1111, 1078], + "text": "Unit", "confidence": 0.994}, {"boundingBox": [1185, 1047, 1267, 1048, + 1266, 1078, 1184, 1078], "text": "Price", "confidence": 0.996}]}, {"boundingBox": + [1382, 1047, 1468, 1047, 1467, 1077, 1382, 1077], "text": "Total", "appearance": + {"style": {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": + [1384, 1047, 1468, 1047, 1468, 1077, 1384, 1077], "text": "Total", "confidence": + 0.996}]}, {"boundingBox": [172, 1093, 279, 1095, 279, 1123, 172, 1121], "text": + "Bindings", "appearance": {"style": {"name": "other", "confidence": 0.878}}, + "words": [{"boundingBox": [172, 1094, 278, 1097, 278, 1123, 173, 1122], "text": + "Bindings", "confidence": 0.995}]}, {"boundingBox": [859, 1094, 893, 1094, + 893, 1119, 859, 1119], "text": "20", "appearance": {"style": {"name": "other", + "confidence": 0.878}}, "words": [{"boundingBox": [860, 1094, 888, 1094, 888, + 1119, 860, 1119], "text": "20", "confidence": 0.999}]}, {"boundingBox": [1240, + 1096, 1295, 1094, 1294, 1118, 1241, 1118], "text": "1.00", "appearance": {"style": + {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": [1240, + 1095, 1291, 1094, 1291, 1117, 1240, 1118], "text": "1.00", "confidence": 0.994}]}, + {"boundingBox": [1458, 1095, 1530, 1095, 1530, 1119, 1458, 1119], "text": + "20.00", "appearance": {"style": {"name": "other", "confidence": 0.878}}, + "words": [{"boundingBox": [1459, 1096, 1527, 1095, 1526, 1120, 1460, 1119], + "text": "20.00", "confidence": 0.996}]}, {"boundingBox": [169, 1135, 332, + 1134, 333, 1160, 169, 1161], "text": "Covers Small", "appearance": {"style": + {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": [170, 1136, + 255, 1136, 254, 1161, 170, 1161], "text": "Covers", "confidence": 0.994}, + {"boundingBox": [260, 1136, 333, 1135, 332, 1161, 259, 1161], "text": "Small", + "confidence": 0.996}]}, {"boundingBox": [859, 1135, 894, 1135, 891, 1160, + 860, 1160], "text": "20", "appearance": {"style": {"name": "other", "confidence": + 0.878}}, "words": [{"boundingBox": [860, 1135, 888, 1135, 888, 1160, 860, + 1160], "text": "20", "confidence": 0.999}]}, {"boundingBox": [1239, 1135, + 1295, 1135, 1294, 1159, 1239, 1160], "text": "1.00", "appearance": {"style": + {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": [1240, + 1135, 1291, 1135, 1291, 1160, 1240, 1160], "text": "1.00", "confidence": 0.993}]}, + {"boundingBox": [1458, 1135, 1530, 1135, 1530, 1159, 1459, 1160], "text": + "20.00", "appearance": {"style": {"name": "other", "confidence": 0.878}}, + "words": [{"boundingBox": [1459, 1135, 1527, 1135, 1527, 1160, 1459, 1160], + "text": "20.00", "confidence": 0.996}]}, {"boundingBox": [173, 1178, 403, + 1177, 403, 1205, 173, 1206], "text": "Feather Bookmark", "appearance": {"style": + {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": [173, 1180, + 266, 1179, 266, 1206, 174, 1206], "text": "Feather", "confidence": 0.996}, + {"boundingBox": [271, 1179, 399, 1178, 400, 1206, 271, 1206], "text": "Bookmark", + "confidence": 0.995}]}, {"boundingBox": [860, 1179, 892, 1179, 891, 1204, + 860, 1203], "text": "20", "appearance": {"style": {"name": "other", "confidence": + 0.878}}, "words": [{"boundingBox": [861, 1179, 889, 1179, 889, 1204, 861, + 1203], "text": "20", "confidence": 0.999}]}, {"boundingBox": [1239, 1179, + 1295, 1178, 1295, 1203, 1239, 1204], "text": "5.00", "appearance": {"style": + {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": [1240, + 1179, 1291, 1178, 1291, 1203, 1240, 1204], "text": "5.00", "confidence": 0.993}]}, + {"boundingBox": [1442, 1180, 1530, 1180, 1530, 1203, 1443, 1204], "text": + "100.00", "appearance": {"style": {"name": "other", "confidence": 0.878}}, + "words": [{"boundingBox": [1443, 1181, 1525, 1180, 1525, 1204, 1443, 1205], + "text": "100.00", "confidence": 0.994}]}, {"boundingBox": [169, 1223, 429, + 1222, 430, 1249, 169, 1253], "text": "Copper Swirl Marker", "appearance": + {"style": {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": + [170, 1223, 259, 1222, 258, 1253, 170, 1253], "text": "Copper", "confidence": + 0.996}, {"boundingBox": [265, 1222, 328, 1222, 327, 1251, 264, 1252], "text": + "Swirl", "confidence": 0.996}, {"boundingBox": [334, 1222, 429, 1223, 428, + 1248, 333, 1251], "text": "Marker", "confidence": 0.996}]}, {"boundingBox": + [860, 1223, 893, 1223, 893, 1247, 860, 1247], "text": "20", "appearance": + {"style": {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": + [861, 1223, 888, 1223, 888, 1247, 861, 1247], "text": "20", "confidence": + 0.999}]}, {"boundingBox": [1239, 1221, 1294, 1222, 1294, 1246, 1239, 1247], + "text": "5.00", "appearance": {"style": {"name": "other", "confidence": 0.878}}, + "words": [{"boundingBox": [1240, 1221, 1292, 1221, 1292, 1247, 1240, 1247], + "text": "5.00", "confidence": 0.986}]}, {"boundingBox": [1443, 1223, 1530, + 1222, 1530, 1246, 1444, 1247], "text": "100.00", "appearance": {"style": {"name": + "other", "confidence": 0.878}}, "words": [{"boundingBox": [1444, 1224, 1526, + 1223, 1525, 1247, 1444, 1248], "text": "100.00", "confidence": 0.062}]}, {"boundingBox": + [1146, 1573, 1296, 1573, 1296, 1600, 1146, 1600], "text": "SUBTOTAL", "appearance": + {"style": {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": + [1148, 1575, 1294, 1575, 1293, 1600, 1148, 1600], "text": "SUBTOTAL", "confidence": + 0.995}]}, {"boundingBox": [1426, 1571, 1530, 1571, 1530, 1597, 1426, 1598], + "text": "$140.00", "appearance": {"style": {"name": "other", "confidence": + 0.878}}, "words": [{"boundingBox": [1428, 1572, 1528, 1572, 1528, 1597, 1428, + 1599], "text": "$140.00", "confidence": 0.995}]}, {"boundingBox": [1236, 1618, + 1296, 1618, 1295, 1643, 1236, 1643], "text": "TAX", "appearance": {"style": + {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": [1237, + 1618, 1290, 1618, 1290, 1643, 1237, 1643], "text": "TAX", "confidence": 0.997}]}, + {"boundingBox": [1458, 1615, 1529, 1615, 1528, 1641, 1458, 1643], "text": + "$4.00", "appearance": {"style": {"name": "other", "confidence": 0.878}}, + "words": [{"boundingBox": [1458, 1615, 1529, 1615, 1529, 1642, 1458, 1643], + "text": "$4.00", "confidence": 0.992}]}, {"boundingBox": [484, 1670, 764, + 1670, 764, 1707, 484, 1706], "text": "Bernie Sanders", "appearance": {"style": + {"name": "handwriting", "confidence": 0.785}}, "words": [{"boundingBox": [484, + 1671, 595, 1671, 595, 1706, 484, 1706], "text": "Bernie", "confidence": 0.993}, + {"boundingBox": [602, 1671, 761, 1670, 762, 1708, 602, 1706], "text": "Sanders", + "confidence": 0.99}]}, {"boundingBox": [1203, 1673, 1297, 1673, 1297, 1698, + 1204, 1699], "text": "TOTAL", "appearance": {"style": {"name": "other", "confidence": + 0.878}}, "words": [{"boundingBox": [1204, 1674, 1295, 1673, 1295, 1699, 1205, + 1699], "text": "TOTAL", "confidence": 0.994}]}, {"boundingBox": [1427, 1670, + 1529, 1669, 1530, 1696, 1427, 1697], "text": "$144.00", "appearance": {"style": + {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": [1427, + 1671, 1526, 1669, 1527, 1697, 1429, 1698], "text": "$144.00", "confidence": + 0.983}]}, {"boundingBox": [542, 1718, 718, 1719, 718, 1742, 542, 1741], "text": + "Bernie Sanders", "appearance": {"style": {"name": "other", "confidence": + 0.878}}, "words": [{"boundingBox": [542, 1719, 616, 1719, 617, 1742, 544, + 1742], "text": "Bernie", "confidence": 0.994}, {"boundingBox": [621, 1719, + 716, 1719, 716, 1743, 622, 1742], "text": "Sanders", "confidence": 0.996}]}, + {"boundingBox": [577, 1753, 681, 1755, 681, 1778, 577, 1776], "text": "Manager", + "appearance": {"style": {"name": "other", "confidence": 0.878}}, "words": + [{"boundingBox": [577, 1754, 681, 1756, 680, 1778, 578, 1776], "text": "Manager", + "confidence": 0.994}]}, {"boundingBox": [172, 1796, 478, 1796, 478, 1832, + 172, 1831], "text": "Additional Notes:", "appearance": {"style": {"name": + "other", "confidence": 0.878}}, "words": [{"boundingBox": [173, 1796, 354, + 1796, 353, 1832, 173, 1831], "text": "Additional", "confidence": 0.993}, {"boundingBox": + [361, 1796, 479, 1797, 478, 1833, 360, 1832], "text": "Notes:", "confidence": + 0.996}]}, {"boundingBox": [174, 1879, 707, 1880, 707, 1911, 174, 1908], "text": + "Do not Jostle Box. Unpack carefully. Enjoy.", "appearance": {"style": {"name": + "other", "confidence": 0.878}}, "words": [{"boundingBox": [175, 1881, 204, + 1881, 204, 1907, 175, 1907], "text": "Do", "confidence": 0.994}, {"boundingBox": + [209, 1881, 254, 1880, 254, 1908, 209, 1907], "text": "not", "confidence": + 0.997}, {"boundingBox": [259, 1880, 332, 1880, 332, 1909, 259, 1908], "text": + "Jostle", "confidence": 0.996}, {"boundingBox": [338, 1880, 399, 1880, 399, + 1909, 338, 1909], "text": "Box.", "confidence": 0.994}, {"boundingBox": [404, + 1880, 499, 1880, 499, 1910, 404, 1909], "text": "Unpack", "confidence": 0.996}, + {"boundingBox": [504, 1880, 623, 1880, 623, 1911, 504, 1910], "text": "carefully.", + "confidence": 0.994}, {"boundingBox": [628, 1880, 707, 1881, 707, 1912, 628, + 1911], "text": "Enjoy.", "confidence": 0.996}]}, {"boundingBox": [168, 1923, + 1510, 1923, 1510, 1957, 168, 1958], "text": "Jupiter Book Supply will refund + you 50% per book if returned within 60 days of reading and", "appearance": + {"style": {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": + [169, 1924, 269, 1924, 269, 1959, 169, 1959], "text": "Jupiter", "confidence": + 0.994}, {"boundingBox": [276, 1924, 354, 1924, 354, 1958, 276, 1959], "text": + "Book", "confidence": 0.994}, {"boundingBox": [361, 1924, 464, 1924, 464, + 1958, 361, 1958], "text": "Supply", "confidence": 0.994}, {"boundingBox": + [471, 1924, 519, 1924, 519, 1958, 471, 1958], "text": "will", "confidence": + 0.992}, {"boundingBox": [526, 1924, 625, 1924, 624, 1958, 526, 1958], "text": + "refund", "confidence": 0.996}, {"boundingBox": [631, 1924, 688, 1924, 688, + 1958, 631, 1958], "text": "you", "confidence": 0.997}, {"boundingBox": [696, + 1924, 762, 1924, 762, 1958, 695, 1958], "text": "50%", "confidence": 0.991}, + {"boundingBox": [769, 1924, 822, 1924, 821, 1958, 769, 1958], "text": "per", + "confidence": 0.998}, {"boundingBox": [829, 1924, 902, 1924, 901, 1958, 828, + 1958], "text": "book", "confidence": 0.994}, {"boundingBox": [909, 1924, 927, + 1924, 927, 1958, 908, 1958], "text": "if", "confidence": 0.996}, {"boundingBox": + [934, 1924, 1063, 1924, 1062, 1958, 933, 1958], "text": "returned", "confidence": + 0.991}, {"boundingBox": [1069, 1924, 1157, 1924, 1156, 1958, 1069, 1958], + "text": "within", "confidence": 0.996}, {"boundingBox": [1164, 1924, 1203, + 1924, 1201, 1958, 1162, 1958], "text": "60", "confidence": 0.997}, {"boundingBox": + [1209, 1924, 1283, 1924, 1281, 1958, 1208, 1958], "text": "days", "confidence": + 0.994}, {"boundingBox": [1290, 1924, 1319, 1924, 1318, 1958, 1288, 1958], + "text": "of", "confidence": 0.999}, {"boundingBox": [1326, 1924, 1441, 1924, + 1440, 1958, 1325, 1958], "text": "reading", "confidence": 0.996}, {"boundingBox": + [1448, 1924, 1507, 1924, 1505, 1958, 1446, 1958], "text": "and", "confidence": + 0.997}]}, {"boundingBox": [168, 1957, 786, 1958, 786, 1991, 168, 1991], "text": + "offer you 25% off you next total purchase.", "appearance": {"style": {"name": + "other", "confidence": 0.878}}, "words": [{"boundingBox": [169, 1958, 235, + 1958, 235, 1991, 169, 1991], "text": "offer", "confidence": 0.991}, {"boundingBox": + [241, 1958, 296, 1958, 296, 1992, 241, 1991], "text": "you", "confidence": + 0.994}, {"boundingBox": [307, 1958, 373, 1958, 374, 1992, 308, 1992], "text": + "25%", "confidence": 0.997}, {"boundingBox": [380, 1958, 420, 1958, 421, 1992, + 380, 1992], "text": "off", "confidence": 0.997}, {"boundingBox": [427, 1958, + 482, 1958, 482, 1992, 427, 1992], "text": "you", "confidence": 0.997}, {"boundingBox": + [489, 1958, 557, 1959, 557, 1992, 489, 1992], "text": "next", "confidence": + 0.994}, {"boundingBox": [563, 1959, 630, 1959, 630, 1991, 564, 1992], "text": + "total", "confidence": 0.996}, {"boundingBox": [636, 1959, 786, 1961, 786, + 1990, 636, 1991], "text": "purchase.", "confidence": 0.994}]}]}], "pageResults": + [{"page": 1, "tables": [{"rows": 5, "columns": 5, "cells": [{"rowIndex": 0, + "columnIndex": 0, "columnSpan": 2, "text": "Details", "boundingBox": [157, + 1038, 847, 1037, 847, 1086, 157, 1086], "elements": ["#/readResults/0/lines/21/words/0"]}, + {"rowIndex": 0, "columnIndex": 2, "text": "Quantity", "boundingBox": [847, + 1037, 1071, 1037, 1071, 1086, 847, 1086], "elements": ["#/readResults/0/lines/22/words/0"]}, + {"rowIndex": 0, "columnIndex": 3, "text": "Unit Price", "boundingBox": [1071, + 1037, 1310, 1038, 1310, 1086, 1071, 1086], "elements": ["#/readResults/0/lines/23/words/0", + "#/readResults/0/lines/23/words/1"]}, {"rowIndex": 0, "columnIndex": 4, "text": + "Total", "boundingBox": [1310, 1038, 1543, 1038, 1543, 1086, 1310, 1086], + "elements": ["#/readResults/0/lines/24/words/0"]}, {"rowIndex": 1, "columnIndex": + 0, "columnSpan": 2, "text": "Bindings", "boundingBox": [157, 1086, 847, 1086, + 847, 1127, 157, 1128], "elements": ["#/readResults/0/lines/25/words/0"]}, + {"rowIndex": 1, "columnIndex": 2, "text": "20", "boundingBox": [847, 1086, + 1071, 1086, 1071, 1127, 847, 1127], "elements": ["#/readResults/0/lines/26/words/0"]}, + {"rowIndex": 1, "columnIndex": 3, "text": "1.00", "boundingBox": [1071, 1086, + 1310, 1086, 1310, 1127, 1071, 1127], "elements": ["#/readResults/0/lines/27/words/0"]}, + {"rowIndex": 1, "columnIndex": 4, "text": "20.00", "boundingBox": [1310, 1086, + 1543, 1086, 1543, 1127, 1310, 1127], "elements": ["#/readResults/0/lines/28/words/0"]}, + {"rowIndex": 2, "columnIndex": 0, "columnSpan": 2, "text": "Covers Small", + "boundingBox": [157, 1128, 847, 1127, 847, 1171, 157, 1171], "elements": ["#/readResults/0/lines/29/words/0", + "#/readResults/0/lines/29/words/1"]}, {"rowIndex": 2, "columnIndex": 2, "text": + "20", "boundingBox": [847, 1127, 1071, 1127, 1071, 1171, 847, 1171], "elements": + ["#/readResults/0/lines/30/words/0"]}, {"rowIndex": 2, "columnIndex": 3, "text": + "1.00", "boundingBox": [1071, 1127, 1310, 1127, 1310, 1171, 1071, 1171], "elements": + ["#/readResults/0/lines/31/words/0"]}, {"rowIndex": 2, "columnIndex": 4, "text": + "20.00", "boundingBox": [1310, 1127, 1543, 1127, 1543, 1171, 1310, 1171], + "elements": ["#/readResults/0/lines/32/words/0"]}, {"rowIndex": 3, "columnIndex": + 0, "columnSpan": 2, "text": "Feather Bookmark", "boundingBox": [157, 1171, + 847, 1171, 847, 1214, 157, 1214], "elements": ["#/readResults/0/lines/33/words/0", + "#/readResults/0/lines/33/words/1"]}, {"rowIndex": 3, "columnIndex": 2, "text": + "20", "boundingBox": [847, 1171, 1071, 1171, 1071, 1214, 847, 1214], "elements": + ["#/readResults/0/lines/34/words/0"]}, {"rowIndex": 3, "columnIndex": 3, "text": + "5.00", "boundingBox": [1071, 1171, 1310, 1171, 1310, 1214, 1071, 1214], "elements": + ["#/readResults/0/lines/35/words/0"]}, {"rowIndex": 3, "columnIndex": 4, "text": + "100.00", "boundingBox": [1310, 1171, 1543, 1171, 1543, 1215, 1310, 1214], + "elements": ["#/readResults/0/lines/36/words/0"]}, {"rowIndex": 4, "columnIndex": + 0, "columnSpan": 2, "text": "Copper Swirl Marker", "boundingBox": [157, 1214, + 847, 1214, 847, 1258, 157, 1258], "elements": ["#/readResults/0/lines/37/words/0", + "#/readResults/0/lines/37/words/1", "#/readResults/0/lines/37/words/2"]}, + {"rowIndex": 4, "columnIndex": 2, "text": "20", "boundingBox": [847, 1214, + 1071, 1214, 1071, 1258, 847, 1258], "elements": ["#/readResults/0/lines/38/words/0"]}, + {"rowIndex": 4, "columnIndex": 3, "text": "5.00", "boundingBox": [1071, 1214, + 1310, 1214, 1310, 1258, 1071, 1258], "elements": ["#/readResults/0/lines/39/words/0"]}, + {"rowIndex": 4, "columnIndex": 4, "text": "100.00", "boundingBox": [1310, + 1214, 1543, 1215, 1543, 1260, 1310, 1258], "elements": ["#/readResults/0/lines/40/words/0"]}], + "boundingBox": [153, 1036, 1547, 1037, 1547, 1265, 153, 1265]}, {"rows": 4, + "columns": 2, "cells": [{"rowIndex": 0, "columnIndex": 0, "text": "SUBTOTAL", + "boundingBox": [1072, 1564, 1307, 1565, 1308, 1609, 1071, 1608], "elements": + ["#/readResults/0/lines/41/words/0"]}, {"rowIndex": 0, "columnIndex": 1, "text": + "$140.00", "boundingBox": [1307, 1565, 1542, 1564, 1543, 1609, 1308, 1609], + "elements": ["#/readResults/0/lines/42/words/0"]}, {"rowIndex": 1, "columnIndex": + 0, "text": "TAX", "boundingBox": [1071, 1608, 1308, 1609, 1308, 1652, 1071, + 1651], "elements": ["#/readResults/0/lines/43/words/0"]}, {"rowIndex": 1, + "columnIndex": 1, "text": "$4.00", "boundingBox": [1308, 1609, 1543, 1609, + 1543, 1652, 1308, 1652], "elements": ["#/readResults/0/lines/44/words/0"]}, + {"rowIndex": 2, "columnIndex": 0, "text": "", "boundingBox": [1071, 1651, + 1308, 1652, 1308, 1663, 1071, 1663], "elements": []}, {"rowIndex": 2, "columnIndex": + 1, "text": "", "boundingBox": [1308, 1652, 1543, 1652, 1543, 1663, 1308, 1663], + "elements": []}, {"rowIndex": 3, "columnIndex": 0, "text": "TOTAL", "boundingBox": + [1071, 1663, 1308, 1663, 1308, 1707, 1071, 1707], "elements": ["#/readResults/0/lines/46/words/0"]}, + {"rowIndex": 3, "columnIndex": 1, "text": "$144.00", "boundingBox": [1308, + 1663, 1543, 1663, 1543, 1708, 1308, 1707], "elements": ["#/readResults/0/lines/47/words/0"]}], + "boundingBox": [1058, 1563, 1555, 1563, 1555, 1707, 1058, 1707]}]}]}}' + headers: + apim-request-id: + - b6454b92-9aae-41bc-b71d-4e29aeb61ce8 + content-length: + - '24433' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 17:49:03 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '17' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_content_async.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_content_async.test_pages_kwarg_specified.yaml new file mode 100644 index 000000000000..d8c76fc9f0f3 --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_content_async.test_pages_kwarg_specified.yaml @@ -0,0 +1,404 @@ +interactions: +- request: + body: '!!! The request body has been omitted from the recording because its size + 479269 is larger than 128KB. !!!' + headers: + Accept: + - application/json + Content-Type: + - image/jpeg + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/layout/analyze?pages=1&readingOrder=basic + response: + body: + string: '' + headers: + apim-request-id: ca058c5f-58ba-49ce-b6fb-5e8762d1ee29 + content-length: '0' + date: Thu, 11 Mar 2021 17:47:46 GMT + operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/layout/analyzeResults/ca058c5f-58ba-49ce-b6fb-5e8762d1ee29 + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '103' + status: + code: 202 + message: Accepted + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/layout/analyze?pages=1&readingOrder=basic +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/layout/analyzeResults/ca058c5f-58ba-49ce-b6fb-5e8762d1ee29 + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-03-11T17:47:47Z", + "lastUpdatedDateTime": "2021-03-11T17:47:51Z", "analyzeResult": {"version": + "2.1.0", "readResults": [{"page": 1, "angle": 0, "width": 1700, "height": + 2200, "unit": "pixel", "lines": [{"boundingBox": [136, 139, 351, 138, 351, + 166, 136, 166], "text": "Purchase Order", "appearance": {"style": {"name": + "other", "confidence": 0.878}}, "words": [{"boundingBox": [137, 140, 259, + 139, 259, 167, 137, 167], "text": "Purchase", "confidence": 0.995}, {"boundingBox": + [265, 139, 350, 139, 350, 167, 265, 167], "text": "Order", "confidence": 0.996}]}, + {"boundingBox": [620, 205, 1074, 204, 1075, 265, 620, 266], "text": "Hero + Limited", "appearance": {"style": {"name": "other", "confidence": 0.878}}, + "words": [{"boundingBox": [621, 208, 773, 206, 772, 266, 620, 266], "text": + "Hero", "confidence": 0.994}, {"boundingBox": [797, 205, 1062, 205, 1061, + 266, 796, 266], "text": "Limited", "confidence": 0.996}]}, {"boundingBox": + [1112, 321, 1554, 321, 1554, 369, 1112, 369], "text": "Purchase Order", "appearance": + {"style": {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": + [1113, 322, 1367, 321, 1367, 370, 1113, 368], "text": "Purchase", "confidence": + 0.995}, {"boundingBox": [1386, 321, 1550, 321, 1549, 370, 1386, 370], "text": + "Order", "confidence": 0.996}]}, {"boundingBox": [163, 352, 528, 350, 528, + 376, 163, 379], "text": "Company Phone: 555-348-6512", "appearance": {"style": + {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": [163, 353, + 272, 351, 273, 379, 164, 378], "text": "Company", "confidence": 0.996}, {"boundingBox": + [277, 351, 360, 351, 361, 378, 278, 379], "text": "Phone:", "confidence": + 0.992}, {"boundingBox": [365, 351, 525, 351, 525, 374, 366, 378], "text": + "555-348-6512", "confidence": 0.994}]}, {"boundingBox": [166, 393, 533, 393, + 533, 418, 166, 418], "text": "Website: www.herolimited.com", "appearance": + {"style": {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": + [167, 394, 268, 393, 268, 418, 167, 417], "text": "Website:", "confidence": + 0.995}, {"boundingBox": [273, 393, 524, 393, 524, 418, 273, 418], "text": + "www.herolimited.com", "confidence": 0.982}]}, {"boundingBox": [165, 435, + 237, 435, 237, 460, 165, 460], "text": "Email:", "appearance": {"style": {"name": + "other", "confidence": 0.878}}, "words": [{"boundingBox": [165, 435, 237, + 435, 237, 460, 165, 460], "text": "Email:", "confidence": 0.994}]}, {"boundingBox": + [1024, 419, 1317, 420, 1317, 448, 1024, 448], "text": "Dated As: 12/20/2020", + "appearance": {"style": {"name": "other", "confidence": 0.878}}, "words": + [{"boundingBox": [1025, 421, 1104, 420, 1104, 448, 1025, 448], "text": "Dated", + "confidence": 0.994}, {"boundingBox": [1112, 420, 1158, 420, 1158, 448, 1112, + 448], "text": "As:", "confidence": 0.998}, {"boundingBox": [1163, 420, 1310, + 421, 1310, 449, 1163, 448], "text": "12/20/2020", "confidence": 0.986}]}, + {"boundingBox": [164, 479, 482, 478, 483, 502, 164, 503], "text": "accounts@herolimited.com", + "appearance": {"style": {"name": "other", "confidence": 0.878}}, "words": + [{"boundingBox": [164, 481, 471, 479, 470, 503, 165, 503], "text": "accounts@herolimited.com", + "confidence": 0.965}]}, {"boundingBox": [1023, 461, 1376, 461, 1376, 489, + 1023, 488], "text": "Purchase Order #: 948284", "appearance": {"style": {"name": + "other", "confidence": 0.878}}, "words": [{"boundingBox": [1023, 461, 1149, + 461, 1150, 489, 1023, 488], "text": "Purchase", "confidence": 0.995}, {"boundingBox": + [1155, 461, 1238, 461, 1238, 489, 1155, 489], "text": "Order", "confidence": + 0.996}, {"boundingBox": [1243, 461, 1273, 461, 1273, 489, 1243, 489], "text": + "#:", "confidence": 0.964}, {"boundingBox": [1278, 461, 1371, 462, 1372, 489, + 1279, 489], "text": "948284", "confidence": 0.996}]}, {"boundingBox": [167, + 547, 397, 546, 397, 591, 167, 592], "text": "Shipped To", "appearance": {"style": + {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": [167, 547, + 328, 547, 328, 592, 168, 592], "text": "Shipped", "confidence": 0.996}, {"boundingBox": + [341, 547, 392, 547, 391, 591, 340, 592], "text": "To", "confidence": 0.994}]}, + {"boundingBox": [159, 609, 520, 609, 520, 638, 159, 638], "text": "Vendor + Name: Hillary Swank", "appearance": {"style": {"name": "other", "confidence": + 0.878}}, "words": [{"boundingBox": [160, 611, 252, 610, 251, 638, 160, 637], + "text": "Vendor", "confidence": 0.996}, {"boundingBox": [257, 610, 344, 609, + 344, 639, 257, 638], "text": "Name:", "confidence": 0.996}, {"boundingBox": + [349, 609, 431, 609, 431, 639, 349, 639], "text": "Hillary", "confidence": + 0.996}, {"boundingBox": [436, 609, 520, 610, 519, 639, 436, 639], "text": + "Swank", "confidence": 0.996}]}, {"boundingBox": [159, 647, 629, 646, 629, + 677, 160, 679], "text": "Company Name: Higgly Wiggly Books", "appearance": + {"style": {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": + [160, 649, 278, 647, 279, 678, 161, 676], "text": "Company", "confidence": + 0.996}, {"boundingBox": [283, 647, 369, 647, 369, 679, 284, 678], "text": + "Name:", "confidence": 0.996}, {"boundingBox": [375, 647, 453, 646, 453, 679, + 375, 679], "text": "Higgly", "confidence": 0.996}, {"boundingBox": [459, 646, + 544, 646, 544, 678, 458, 679], "text": "Wiggly", "confidence": 0.996}, {"boundingBox": + [550, 646, 629, 646, 628, 676, 549, 678], "text": "Books", "confidence": 0.996}]}, + {"boundingBox": [160, 684, 526, 684, 526, 712, 160, 711], "text": "Address: + 938 NE Burner Road", "appearance": {"style": {"name": "other", "confidence": + 0.878}}, "words": [{"boundingBox": [161, 685, 270, 685, 269, 712, 160, 711], + "text": "Address:", "confidence": 0.994}, {"boundingBox": [275, 685, 321, + 685, 320, 713, 275, 712], "text": "938", "confidence": 0.998}, {"boundingBox": + [327, 685, 363, 685, 362, 713, 326, 713], "text": "NE", "confidence": 0.996}, + {"boundingBox": [368, 685, 455, 685, 454, 713, 367, 713], "text": "Burner", + "confidence": 0.996}, {"boundingBox": [460, 685, 523, 685, 522, 713, 459, + 713], "text": "Road", "confidence": 0.994}]}, {"boundingBox": [279, 722, 566, + 721, 566, 750, 279, 751], "text": "Boulder City, CO 92848", "appearance": + {"style": {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": + [279, 722, 371, 722, 372, 751, 280, 750], "text": "Boulder", "confidence": + 0.996}, {"boundingBox": [376, 722, 433, 722, 433, 751, 377, 751], "text": + "City,", "confidence": 0.996}, {"boundingBox": [438, 722, 474, 722, 474, 751, + 438, 751], "text": "CO", "confidence": 0.997}, {"boundingBox": [483, 722, + 561, 722, 560, 749, 483, 751], "text": "92848", "confidence": 0.996}]}, {"boundingBox": + [612, 721, 885, 721, 885, 747, 612, 748], "text": "Phone: 938-294-2949", "appearance": + {"style": {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": + [613, 722, 704, 722, 704, 749, 613, 749], "text": "Phone:", "confidence": + 0.994}, {"boundingBox": [709, 722, 882, 722, 882, 748, 709, 749], "text": + "938-294-2949", "confidence": 0.994}]}, {"boundingBox": [167, 784, 453, 784, + 453, 829, 167, 830], "text": "Shipped From", "appearance": {"style": {"name": + "other", "confidence": 0.878}}, "words": [{"boundingBox": [167, 784, 328, + 785, 329, 830, 169, 830], "text": "Shipped", "confidence": 0.996}, {"boundingBox": + [338, 785, 435, 785, 434, 827, 338, 830], "text": "From", "confidence": 0.994}]}, + {"boundingBox": [165, 852, 445, 851, 445, 878, 165, 879], "text": "Name: Bernie + Sanders", "appearance": {"style": {"name": "other", "confidence": 0.878}}, + "words": [{"boundingBox": [166, 853, 248, 853, 248, 879, 166, 879], "text": + "Name:", "confidence": 0.986}, {"boundingBox": [253, 853, 337, 852, 337, 880, + 253, 879], "text": "Bernie", "confidence": 0.996}, {"boundingBox": [342, 852, + 445, 852, 445, 879, 342, 880], "text": "Sanders", "confidence": 0.996}]}, + {"boundingBox": [164, 889, 629, 889, 629, 919, 164, 919], "text": "Company + Name: Jupiter Book Supply", "appearance": {"style": {"name": "other", "confidence": + 0.878}}, "words": [{"boundingBox": [164, 890, 282, 890, 283, 919, 165, 919], + "text": "Company", "confidence": 0.996}, {"boundingBox": [288, 890, 373, 889, + 374, 919, 289, 919], "text": "Name:", "confidence": 0.996}, {"boundingBox": + [379, 889, 467, 889, 467, 919, 380, 919], "text": "Jupiter", "confidence": + 0.996}, {"boundingBox": [473, 889, 538, 889, 538, 920, 473, 919], "text": + "Book", "confidence": 0.994}, {"boundingBox": [543, 889, 630, 890, 629, 920, + 543, 920], "text": "Supply", "confidence": 0.996}]}, {"boundingBox": [165, + 925, 521, 926, 521, 953, 165, 952], "text": "Address: 383 N Kinnick Road", + "appearance": {"style": {"name": "other", "confidence": 0.878}}, "words": + [{"boundingBox": [166, 926, 275, 925, 274, 953, 166, 953], "text": "Address:", + "confidence": 0.994}, {"boundingBox": [280, 925, 325, 925, 324, 953, 280, + 953], "text": "383", "confidence": 0.998}, {"boundingBox": [330, 925, 345, + 926, 345, 953, 330, 953], "text": "N", "confidence": 0.995}, {"boundingBox": + [358, 926, 448, 926, 447, 954, 357, 953], "text": "Kinnick", "confidence": + 0.995}, {"boundingBox": [453, 926, 516, 927, 516, 954, 452, 954], "text": + "Road", "confidence": 0.994}]}, {"boundingBox": [280, 963, 514, 962, 514, + 990, 281, 991], "text": "Seattle, WA 38383", "appearance": {"style": {"name": + "other", "confidence": 0.878}}, "words": [{"boundingBox": [282, 965, 376, + 964, 377, 991, 284, 991], "text": "Seattle,", "confidence": 0.994}, {"boundingBox": + [382, 964, 425, 964, 425, 991, 383, 991], "text": "WA", "confidence": 0.998}, + {"boundingBox": [435, 964, 513, 962, 514, 990, 436, 991], "text": "38383", + "confidence": 0.996}]}, {"boundingBox": [760, 963, 1032, 963, 1032, 989, 760, + 990], "text": "Phone: 932-299-0292", "appearance": {"style": {"name": "other", + "confidence": 0.878}}, "words": [{"boundingBox": [760, 964, 849, 964, 848, + 990, 760, 990], "text": "Phone:", "confidence": 0.996}, {"boundingBox": [854, + 964, 1028, 963, 1027, 990, 854, 990], "text": "932-299-0292", "confidence": + 0.994}]}, {"boundingBox": [446, 1047, 558, 1047, 558, 1077, 446, 1077], "text": + "Details", "appearance": {"style": {"name": "other", "confidence": 0.878}}, + "words": [{"boundingBox": [447, 1048, 557, 1048, 557, 1077, 446, 1078], "text": + "Details", "confidence": 0.994}]}, {"boundingBox": [885, 1047, 1034, 1047, + 1034, 1083, 886, 1083], "text": "Quantity", "appearance": {"style": {"name": + "other", "confidence": 0.878}}, "words": [{"boundingBox": [886, 1048, 1030, + 1047, 1030, 1084, 886, 1084], "text": "Quantity", "confidence": 0.994}]}, + {"boundingBox": [1111, 1047, 1270, 1047, 1269, 1078, 1111, 1077], "text": + "Unit Price", "appearance": {"style": {"name": "other", "confidence": 0.878}}, + "words": [{"boundingBox": [1112, 1047, 1179, 1047, 1178, 1078, 1111, 1078], + "text": "Unit", "confidence": 0.994}, {"boundingBox": [1185, 1047, 1267, 1048, + 1266, 1078, 1184, 1078], "text": "Price", "confidence": 0.996}]}, {"boundingBox": + [1382, 1047, 1468, 1047, 1467, 1077, 1382, 1077], "text": "Total", "appearance": + {"style": {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": + [1384, 1047, 1468, 1047, 1468, 1077, 1384, 1077], "text": "Total", "confidence": + 0.996}]}, {"boundingBox": [172, 1093, 279, 1095, 279, 1123, 172, 1121], "text": + "Bindings", "appearance": {"style": {"name": "other", "confidence": 0.878}}, + "words": [{"boundingBox": [172, 1094, 278, 1097, 278, 1123, 173, 1122], "text": + "Bindings", "confidence": 0.995}]}, {"boundingBox": [859, 1094, 893, 1094, + 893, 1119, 859, 1119], "text": "20", "appearance": {"style": {"name": "other", + "confidence": 0.878}}, "words": [{"boundingBox": [860, 1094, 888, 1094, 888, + 1119, 860, 1119], "text": "20", "confidence": 0.999}]}, {"boundingBox": [1240, + 1096, 1295, 1094, 1294, 1118, 1241, 1118], "text": "1.00", "appearance": {"style": + {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": [1240, + 1095, 1291, 1094, 1291, 1117, 1240, 1118], "text": "1.00", "confidence": 0.994}]}, + {"boundingBox": [1458, 1095, 1530, 1095, 1530, 1119, 1458, 1119], "text": + "20.00", "appearance": {"style": {"name": "other", "confidence": 0.878}}, + "words": [{"boundingBox": [1459, 1096, 1527, 1095, 1526, 1120, 1460, 1119], + "text": "20.00", "confidence": 0.996}]}, {"boundingBox": [169, 1135, 332, + 1134, 333, 1160, 169, 1161], "text": "Covers Small", "appearance": {"style": + {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": [170, 1136, + 255, 1136, 254, 1161, 170, 1161], "text": "Covers", "confidence": 0.994}, + {"boundingBox": [260, 1136, 333, 1135, 332, 1161, 259, 1161], "text": "Small", + "confidence": 0.996}]}, {"boundingBox": [859, 1135, 894, 1135, 891, 1160, + 860, 1160], "text": "20", "appearance": {"style": {"name": "other", "confidence": + 0.878}}, "words": [{"boundingBox": [860, 1135, 888, 1135, 888, 1160, 860, + 1160], "text": "20", "confidence": 0.999}]}, {"boundingBox": [1239, 1135, + 1295, 1135, 1294, 1159, 1239, 1160], "text": "1.00", "appearance": {"style": + {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": [1240, + 1135, 1291, 1135, 1291, 1160, 1240, 1160], "text": "1.00", "confidence": 0.993}]}, + {"boundingBox": [1458, 1135, 1530, 1135, 1530, 1159, 1459, 1160], "text": + "20.00", "appearance": {"style": {"name": "other", "confidence": 0.878}}, + "words": [{"boundingBox": [1459, 1135, 1527, 1135, 1527, 1160, 1459, 1160], + "text": "20.00", "confidence": 0.996}]}, {"boundingBox": [173, 1178, 403, + 1177, 403, 1205, 173, 1206], "text": "Feather Bookmark", "appearance": {"style": + {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": [173, 1180, + 266, 1179, 266, 1206, 174, 1206], "text": "Feather", "confidence": 0.996}, + {"boundingBox": [271, 1179, 399, 1178, 400, 1206, 271, 1206], "text": "Bookmark", + "confidence": 0.995}]}, {"boundingBox": [860, 1179, 892, 1179, 891, 1204, + 860, 1203], "text": "20", "appearance": {"style": {"name": "other", "confidence": + 0.878}}, "words": [{"boundingBox": [861, 1179, 889, 1179, 889, 1204, 861, + 1203], "text": "20", "confidence": 0.999}]}, {"boundingBox": [1239, 1179, + 1295, 1178, 1295, 1203, 1239, 1204], "text": "5.00", "appearance": {"style": + {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": [1240, + 1179, 1291, 1178, 1291, 1203, 1240, 1204], "text": "5.00", "confidence": 0.993}]}, + {"boundingBox": [1442, 1180, 1530, 1180, 1530, 1203, 1443, 1204], "text": + "100.00", "appearance": {"style": {"name": "other", "confidence": 0.878}}, + "words": [{"boundingBox": [1443, 1181, 1525, 1180, 1525, 1204, 1443, 1205], + "text": "100.00", "confidence": 0.994}]}, {"boundingBox": [169, 1223, 429, + 1222, 430, 1249, 169, 1253], "text": "Copper Swirl Marker", "appearance": + {"style": {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": + [170, 1223, 259, 1222, 258, 1253, 170, 1253], "text": "Copper", "confidence": + 0.996}, {"boundingBox": [265, 1222, 328, 1222, 327, 1251, 264, 1252], "text": + "Swirl", "confidence": 0.996}, {"boundingBox": [334, 1222, 429, 1223, 428, + 1248, 333, 1251], "text": "Marker", "confidence": 0.996}]}, {"boundingBox": + [860, 1223, 893, 1223, 893, 1247, 860, 1247], "text": "20", "appearance": + {"style": {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": + [861, 1223, 888, 1223, 888, 1247, 861, 1247], "text": "20", "confidence": + 0.999}]}, {"boundingBox": [1239, 1221, 1294, 1222, 1294, 1246, 1239, 1247], + "text": "5.00", "appearance": {"style": {"name": "other", "confidence": 0.878}}, + "words": [{"boundingBox": [1240, 1221, 1292, 1221, 1292, 1247, 1240, 1247], + "text": "5.00", "confidence": 0.986}]}, {"boundingBox": [1443, 1223, 1530, + 1222, 1530, 1246, 1444, 1247], "text": "100.00", "appearance": {"style": {"name": + "other", "confidence": 0.878}}, "words": [{"boundingBox": [1444, 1224, 1526, + 1223, 1525, 1247, 1444, 1248], "text": "100.00", "confidence": 0.062}]}, {"boundingBox": + [1146, 1573, 1296, 1573, 1296, 1600, 1146, 1600], "text": "SUBTOTAL", "appearance": + {"style": {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": + [1148, 1575, 1294, 1575, 1293, 1600, 1148, 1600], "text": "SUBTOTAL", "confidence": + 0.995}]}, {"boundingBox": [1426, 1571, 1530, 1571, 1530, 1597, 1426, 1598], + "text": "$140.00", "appearance": {"style": {"name": "other", "confidence": + 0.878}}, "words": [{"boundingBox": [1428, 1572, 1528, 1572, 1528, 1597, 1428, + 1599], "text": "$140.00", "confidence": 0.995}]}, {"boundingBox": [1236, 1618, + 1296, 1618, 1295, 1643, 1236, 1643], "text": "TAX", "appearance": {"style": + {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": [1237, + 1618, 1290, 1618, 1290, 1643, 1237, 1643], "text": "TAX", "confidence": 0.997}]}, + {"boundingBox": [1458, 1615, 1529, 1615, 1528, 1641, 1458, 1643], "text": + "$4.00", "appearance": {"style": {"name": "other", "confidence": 0.878}}, + "words": [{"boundingBox": [1458, 1615, 1529, 1615, 1529, 1642, 1458, 1643], + "text": "$4.00", "confidence": 0.992}]}, {"boundingBox": [484, 1670, 764, + 1670, 764, 1707, 484, 1706], "text": "Bernie Sanders", "appearance": {"style": + {"name": "handwriting", "confidence": 0.785}}, "words": [{"boundingBox": [484, + 1671, 595, 1671, 595, 1706, 484, 1706], "text": "Bernie", "confidence": 0.993}, + {"boundingBox": [602, 1671, 761, 1670, 762, 1708, 602, 1706], "text": "Sanders", + "confidence": 0.99}]}, {"boundingBox": [1203, 1673, 1297, 1673, 1297, 1698, + 1204, 1699], "text": "TOTAL", "appearance": {"style": {"name": "other", "confidence": + 0.878}}, "words": [{"boundingBox": [1204, 1674, 1295, 1673, 1295, 1699, 1205, + 1699], "text": "TOTAL", "confidence": 0.994}]}, {"boundingBox": [1427, 1670, + 1529, 1669, 1530, 1696, 1427, 1697], "text": "$144.00", "appearance": {"style": + {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": [1427, + 1671, 1526, 1669, 1527, 1697, 1429, 1698], "text": "$144.00", "confidence": + 0.983}]}, {"boundingBox": [542, 1718, 718, 1719, 718, 1742, 542, 1741], "text": + "Bernie Sanders", "appearance": {"style": {"name": "other", "confidence": + 0.878}}, "words": [{"boundingBox": [542, 1719, 616, 1719, 617, 1742, 544, + 1742], "text": "Bernie", "confidence": 0.994}, {"boundingBox": [621, 1719, + 716, 1719, 716, 1743, 622, 1742], "text": "Sanders", "confidence": 0.996}]}, + {"boundingBox": [577, 1753, 681, 1755, 681, 1778, 577, 1776], "text": "Manager", + "appearance": {"style": {"name": "other", "confidence": 0.878}}, "words": + [{"boundingBox": [577, 1754, 681, 1756, 680, 1778, 578, 1776], "text": "Manager", + "confidence": 0.994}]}, {"boundingBox": [172, 1796, 478, 1796, 478, 1832, + 172, 1831], "text": "Additional Notes:", "appearance": {"style": {"name": + "other", "confidence": 0.878}}, "words": [{"boundingBox": [173, 1796, 354, + 1796, 353, 1832, 173, 1831], "text": "Additional", "confidence": 0.993}, {"boundingBox": + [361, 1796, 479, 1797, 478, 1833, 360, 1832], "text": "Notes:", "confidence": + 0.996}]}, {"boundingBox": [174, 1879, 707, 1880, 707, 1911, 174, 1908], "text": + "Do not Jostle Box. Unpack carefully. Enjoy.", "appearance": {"style": {"name": + "other", "confidence": 0.878}}, "words": [{"boundingBox": [175, 1881, 204, + 1881, 204, 1907, 175, 1907], "text": "Do", "confidence": 0.994}, {"boundingBox": + [209, 1881, 254, 1880, 254, 1908, 209, 1907], "text": "not", "confidence": + 0.997}, {"boundingBox": [259, 1880, 332, 1880, 332, 1909, 259, 1908], "text": + "Jostle", "confidence": 0.996}, {"boundingBox": [338, 1880, 399, 1880, 399, + 1909, 338, 1909], "text": "Box.", "confidence": 0.994}, {"boundingBox": [404, + 1880, 499, 1880, 499, 1910, 404, 1909], "text": "Unpack", "confidence": 0.996}, + {"boundingBox": [504, 1880, 623, 1880, 623, 1911, 504, 1910], "text": "carefully.", + "confidence": 0.994}, {"boundingBox": [628, 1880, 707, 1881, 707, 1912, 628, + 1911], "text": "Enjoy.", "confidence": 0.996}]}, {"boundingBox": [168, 1923, + 1510, 1923, 1510, 1957, 168, 1958], "text": "Jupiter Book Supply will refund + you 50% per book if returned within 60 days of reading and", "appearance": + {"style": {"name": "other", "confidence": 0.878}}, "words": [{"boundingBox": + [169, 1924, 269, 1924, 269, 1959, 169, 1959], "text": "Jupiter", "confidence": + 0.994}, {"boundingBox": [276, 1924, 354, 1924, 354, 1958, 276, 1959], "text": + "Book", "confidence": 0.994}, {"boundingBox": [361, 1924, 464, 1924, 464, + 1958, 361, 1958], "text": "Supply", "confidence": 0.994}, {"boundingBox": + [471, 1924, 519, 1924, 519, 1958, 471, 1958], "text": "will", "confidence": + 0.992}, {"boundingBox": [526, 1924, 625, 1924, 624, 1958, 526, 1958], "text": + "refund", "confidence": 0.996}, {"boundingBox": [631, 1924, 688, 1924, 688, + 1958, 631, 1958], "text": "you", "confidence": 0.997}, {"boundingBox": [696, + 1924, 762, 1924, 762, 1958, 695, 1958], "text": "50%", "confidence": 0.991}, + {"boundingBox": [769, 1924, 822, 1924, 821, 1958, 769, 1958], "text": "per", + "confidence": 0.998}, {"boundingBox": [829, 1924, 902, 1924, 901, 1958, 828, + 1958], "text": "book", "confidence": 0.994}, {"boundingBox": [909, 1924, 927, + 1924, 927, 1958, 908, 1958], "text": "if", "confidence": 0.996}, {"boundingBox": + [934, 1924, 1063, 1924, 1062, 1958, 933, 1958], "text": "returned", "confidence": + 0.991}, {"boundingBox": [1069, 1924, 1157, 1924, 1156, 1958, 1069, 1958], + "text": "within", "confidence": 0.996}, {"boundingBox": [1164, 1924, 1203, + 1924, 1201, 1958, 1162, 1958], "text": "60", "confidence": 0.997}, {"boundingBox": + [1209, 1924, 1283, 1924, 1281, 1958, 1208, 1958], "text": "days", "confidence": + 0.994}, {"boundingBox": [1290, 1924, 1319, 1924, 1318, 1958, 1288, 1958], + "text": "of", "confidence": 0.999}, {"boundingBox": [1326, 1924, 1441, 1924, + 1440, 1958, 1325, 1958], "text": "reading", "confidence": 0.996}, {"boundingBox": + [1448, 1924, 1507, 1924, 1505, 1958, 1446, 1958], "text": "and", "confidence": + 0.997}]}, {"boundingBox": [168, 1957, 786, 1958, 786, 1991, 168, 1991], "text": + "offer you 25% off you next total purchase.", "appearance": {"style": {"name": + "other", "confidence": 0.878}}, "words": [{"boundingBox": [169, 1958, 235, + 1958, 235, 1991, 169, 1991], "text": "offer", "confidence": 0.991}, {"boundingBox": + [241, 1958, 296, 1958, 296, 1992, 241, 1991], "text": "you", "confidence": + 0.994}, {"boundingBox": [307, 1958, 373, 1958, 374, 1992, 308, 1992], "text": + "25%", "confidence": 0.997}, {"boundingBox": [380, 1958, 420, 1958, 421, 1992, + 380, 1992], "text": "off", "confidence": 0.997}, {"boundingBox": [427, 1958, + 482, 1958, 482, 1992, 427, 1992], "text": "you", "confidence": 0.997}, {"boundingBox": + [489, 1958, 557, 1959, 557, 1992, 489, 1992], "text": "next", "confidence": + 0.994}, {"boundingBox": [563, 1959, 630, 1959, 630, 1991, 564, 1992], "text": + "total", "confidence": 0.996}, {"boundingBox": [636, 1959, 786, 1961, 786, + 1990, 636, 1991], "text": "purchase.", "confidence": 0.994}]}]}], "pageResults": + [{"page": 1, "tables": [{"rows": 5, "columns": 5, "cells": [{"rowIndex": 0, + "columnIndex": 0, "columnSpan": 2, "text": "Details", "boundingBox": [157, + 1038, 847, 1037, 847, 1086, 157, 1086], "elements": ["#/readResults/0/lines/21/words/0"]}, + {"rowIndex": 0, "columnIndex": 2, "text": "Quantity", "boundingBox": [847, + 1037, 1071, 1037, 1071, 1086, 847, 1086], "elements": ["#/readResults/0/lines/22/words/0"]}, + {"rowIndex": 0, "columnIndex": 3, "text": "Unit Price", "boundingBox": [1071, + 1037, 1310, 1038, 1310, 1086, 1071, 1086], "elements": ["#/readResults/0/lines/23/words/0", + "#/readResults/0/lines/23/words/1"]}, {"rowIndex": 0, "columnIndex": 4, "text": + "Total", "boundingBox": [1310, 1038, 1543, 1038, 1543, 1086, 1310, 1086], + "elements": ["#/readResults/0/lines/24/words/0"]}, {"rowIndex": 1, "columnIndex": + 0, "columnSpan": 2, "text": "Bindings", "boundingBox": [157, 1086, 847, 1086, + 847, 1127, 157, 1128], "elements": ["#/readResults/0/lines/25/words/0"]}, + {"rowIndex": 1, "columnIndex": 2, "text": "20", "boundingBox": [847, 1086, + 1071, 1086, 1071, 1127, 847, 1127], "elements": ["#/readResults/0/lines/26/words/0"]}, + {"rowIndex": 1, "columnIndex": 3, "text": "1.00", "boundingBox": [1071, 1086, + 1310, 1086, 1310, 1127, 1071, 1127], "elements": ["#/readResults/0/lines/27/words/0"]}, + {"rowIndex": 1, "columnIndex": 4, "text": "20.00", "boundingBox": [1310, 1086, + 1543, 1086, 1543, 1127, 1310, 1127], "elements": ["#/readResults/0/lines/28/words/0"]}, + {"rowIndex": 2, "columnIndex": 0, "columnSpan": 2, "text": "Covers Small", + "boundingBox": [157, 1128, 847, 1127, 847, 1171, 157, 1171], "elements": ["#/readResults/0/lines/29/words/0", + "#/readResults/0/lines/29/words/1"]}, {"rowIndex": 2, "columnIndex": 2, "text": + "20", "boundingBox": [847, 1127, 1071, 1127, 1071, 1171, 847, 1171], "elements": + ["#/readResults/0/lines/30/words/0"]}, {"rowIndex": 2, "columnIndex": 3, "text": + "1.00", "boundingBox": [1071, 1127, 1310, 1127, 1310, 1171, 1071, 1171], "elements": + ["#/readResults/0/lines/31/words/0"]}, {"rowIndex": 2, "columnIndex": 4, "text": + "20.00", "boundingBox": [1310, 1127, 1543, 1127, 1543, 1171, 1310, 1171], + "elements": ["#/readResults/0/lines/32/words/0"]}, {"rowIndex": 3, "columnIndex": + 0, "columnSpan": 2, "text": "Feather Bookmark", "boundingBox": [157, 1171, + 847, 1171, 847, 1214, 157, 1214], "elements": ["#/readResults/0/lines/33/words/0", + "#/readResults/0/lines/33/words/1"]}, {"rowIndex": 3, "columnIndex": 2, "text": + "20", "boundingBox": [847, 1171, 1071, 1171, 1071, 1214, 847, 1214], "elements": + ["#/readResults/0/lines/34/words/0"]}, {"rowIndex": 3, "columnIndex": 3, "text": + "5.00", "boundingBox": [1071, 1171, 1310, 1171, 1310, 1214, 1071, 1214], "elements": + ["#/readResults/0/lines/35/words/0"]}, {"rowIndex": 3, "columnIndex": 4, "text": + "100.00", "boundingBox": [1310, 1171, 1543, 1171, 1543, 1215, 1310, 1214], + "elements": ["#/readResults/0/lines/36/words/0"]}, {"rowIndex": 4, "columnIndex": + 0, "columnSpan": 2, "text": "Copper Swirl Marker", "boundingBox": [157, 1214, + 847, 1214, 847, 1258, 157, 1258], "elements": ["#/readResults/0/lines/37/words/0", + "#/readResults/0/lines/37/words/1", "#/readResults/0/lines/37/words/2"]}, + {"rowIndex": 4, "columnIndex": 2, "text": "20", "boundingBox": [847, 1214, + 1071, 1214, 1071, 1258, 847, 1258], "elements": ["#/readResults/0/lines/38/words/0"]}, + {"rowIndex": 4, "columnIndex": 3, "text": "5.00", "boundingBox": [1071, 1214, + 1310, 1214, 1310, 1258, 1071, 1258], "elements": ["#/readResults/0/lines/39/words/0"]}, + {"rowIndex": 4, "columnIndex": 4, "text": "100.00", "boundingBox": [1310, + 1214, 1543, 1215, 1543, 1260, 1310, 1258], "elements": ["#/readResults/0/lines/40/words/0"]}], + "boundingBox": [153, 1036, 1547, 1037, 1547, 1265, 153, 1265]}, {"rows": 4, + "columns": 2, "cells": [{"rowIndex": 0, "columnIndex": 0, "text": "SUBTOTAL", + "boundingBox": [1072, 1564, 1307, 1565, 1308, 1609, 1071, 1608], "elements": + ["#/readResults/0/lines/41/words/0"]}, {"rowIndex": 0, "columnIndex": 1, "text": + "$140.00", "boundingBox": [1307, 1565, 1542, 1564, 1543, 1609, 1308, 1609], + "elements": ["#/readResults/0/lines/42/words/0"]}, {"rowIndex": 1, "columnIndex": + 0, "text": "TAX", "boundingBox": [1071, 1608, 1308, 1609, 1308, 1652, 1071, + 1651], "elements": ["#/readResults/0/lines/43/words/0"]}, {"rowIndex": 1, + "columnIndex": 1, "text": "$4.00", "boundingBox": [1308, 1609, 1543, 1609, + 1543, 1652, 1308, 1652], "elements": ["#/readResults/0/lines/44/words/0"]}, + {"rowIndex": 2, "columnIndex": 0, "text": "", "boundingBox": [1071, 1651, + 1308, 1652, 1308, 1663, 1071, 1663], "elements": []}, {"rowIndex": 2, "columnIndex": + 1, "text": "", "boundingBox": [1308, 1652, 1543, 1652, 1543, 1663, 1308, 1663], + "elements": []}, {"rowIndex": 3, "columnIndex": 0, "text": "TOTAL", "boundingBox": + [1071, 1663, 1308, 1663, 1308, 1707, 1071, 1707], "elements": ["#/readResults/0/lines/46/words/0"]}, + {"rowIndex": 3, "columnIndex": 1, "text": "$144.00", "boundingBox": [1308, + 1663, 1543, 1663, 1543, 1708, 1308, 1707], "elements": ["#/readResults/0/lines/47/words/0"]}], + "boundingBox": [1058, 1563, 1555, 1563, 1555, 1707, 1058, 1707]}]}]}}' + headers: + apim-request-id: 1835c9ee-571c-4b55-95e9-053e2a3334a7 + content-length: '24433' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 17:47:52 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '31' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/layout/analyzeResults/ca058c5f-58ba-49ce-b6fb-5e8762d1ee29 +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_content_from_url.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_content_from_url.test_pages_kwarg_specified.yaml new file mode 100644 index 000000000000..10acca5f4ba9 --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_content_from_url.test_pages_kwarg_specified.yaml @@ -0,0 +1,326 @@ +interactions: +- request: + body: 'b''{"source": "blob_sas_url"}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '232' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/layout/analyze?pages=1&readingOrder=basic + response: + body: + string: '' + headers: + apim-request-id: + - 61f0aa22-e61a-43cd-b2af-f7e327158061 + content-length: + - '0' + date: + - Thu, 11 Mar 2021 17:48:20 GMT + operation-location: + - https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/layout/analyzeResults/61f0aa22-e61a-43cd-b2af-f7e327158061 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '86' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/layout/analyzeResults/61f0aa22-e61a-43cd-b2af-f7e327158061 + response: + body: + string: '{"status": "running", "createdDateTime": "2021-03-11T17:48:20Z", "lastUpdatedDateTime": + "2021-03-11T17:48:20Z"}' + headers: + apim-request-id: + - c09983b6-a724-444c-ada0-ced18a5dcbee + content-length: + - '106' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 17:48:25 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '12' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/layout/analyzeResults/61f0aa22-e61a-43cd-b2af-f7e327158061 + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-03-11T17:48:20Z", + "lastUpdatedDateTime": "2021-03-11T17:48:26Z", "analyzeResult": {"version": + "2.1.0", "readResults": [{"page": 1, "angle": 0, "width": 8.5, "height": 11, + "unit": "inch", "lines": [{"boundingBox": [0.8917, 1.1119, 2.5309, 1.1119, + 2.5309, 1.2798, 0.8917, 1.2798], "text": "Empresa una factura", "appearance": + {"style": {"name": "other", "confidence": 1}}, "words": [{"boundingBox": [0.8917, + 1.122, 1.5491, 1.122, 1.5491, 1.2798, 0.8917, 1.2798], "text": "Empresa", + "confidence": 1}, {"boundingBox": [1.6193, 1.1528, 1.8907, 1.1528, 1.8907, + 1.2468, 1.6193, 1.2468], "text": "una", "confidence": 1}, {"boundingBox": + [1.9855, 1.1119, 2.5309, 1.1119, 2.5309, 1.2468, 1.9855, 1.2468], "text": + "factura", "confidence": 1}]}, {"boundingBox": [6.0196, 1.0719, 7.1762, 1.0719, + 7.1762, 1.2512, 6.0196, 1.2512], "text": "Factura para:", "appearance": {"style": + {"name": "other", "confidence": 1}}, "words": [{"boundingBox": [6.0196, 1.0719, + 6.6611, 1.0719, 6.6611, 1.2137, 6.0196, 1.2137], "text": "Factura", "confidence": + 1}, {"boundingBox": [6.744, 1.1069, 7.1762, 1.1069, 7.1762, 1.2512, 6.744, + 1.2512], "text": "para:", "confidence": 1}]}, {"boundingBox": [0.8888, 1.4782, + 1.675, 1.4782, 1.675, 1.6139, 0.8888, 1.6139], "text": "Direcci\u00f3n:", + "appearance": {"style": {"name": "other", "confidence": 1}}, "words": [{"boundingBox": + [0.8888, 1.4782, 1.675, 1.4782, 1.675, 1.6139, 0.8888, 1.6139], "text": "Direcci\u00f3n:", + "confidence": 1}]}, {"boundingBox": [6.015, 1.4478, 6.8276, 1.4478, 6.8276, + 1.5633, 6.015, 1.5633], "text": "Bilbo Bols\u00f3n", "appearance": {"style": + {"name": "other", "confidence": 1}}, "words": [{"boundingBox": [6.015, 1.4486, + 6.3363, 1.4486, 6.3363, 1.5633, 6.015, 1.5633], "text": "Bilbo", "confidence": + 1}, {"boundingBox": [6.3963, 1.4478, 6.8276, 1.4478, 6.8276, 1.5633, 6.3963, + 1.5633], "text": "Bols\u00f3n", "confidence": 1}]}, {"boundingBox": [6.0151, + 1.6686, 7.1031, 1.6686, 7.1031, 1.7833, 6.0151, 1.7833], "text": "123 Hobbit + Lane", "appearance": {"style": {"name": "other", "confidence": 1}}, "words": + [{"boundingBox": [6.0151, 1.6751, 6.2451, 1.6751, 6.2451, 1.7833, 6.0151, + 1.7833], "text": "123", "confidence": 1}, {"boundingBox": [6.308, 1.6686, + 6.7475, 1.6686, 6.7475, 1.7833, 6.308, 1.7833], "text": "Hobbit", "confidence": + 1}, {"boundingBox": [6.8056, 1.6761, 7.1031, 1.6761, 7.1031, 1.7833, 6.8056, + 1.7833], "text": "Lane", "confidence": 1}]}, {"boundingBox": [0.8835, 1.8456, + 1.7162, 1.8456, 1.7162, 1.9549, 0.8835, 1.9549], "text": "567 Main St.", "appearance": + {"style": {"name": "other", "confidence": 1}}, "words": [{"boundingBox": [0.8835, + 1.8468, 1.1218, 1.8468, 1.1218, 1.9549, 0.8835, 1.9549], "text": "567", "confidence": + 1}, {"boundingBox": [1.1808, 1.8456, 1.5037, 1.8456, 1.5037, 1.9549, 1.1808, + 1.9549], "text": "Main", "confidence": 1}, {"boundingBox": [1.559, 1.8468, + 1.7162, 1.8468, 1.7162, 1.9549, 1.559, 1.9549], "text": "St.", "confidence": + 1}]}, {"boundingBox": [6.015, 1.8889, 6.6458, 1.8889, 6.6458, 2.0033, 6.015, + 2.0033], "text": "Redmond", "appearance": {"style": {"name": "other", "confidence": + 1}}, "words": [{"boundingBox": [6.015, 1.8889, 6.6458, 1.8889, 6.6458, 2.0033, + 6.015, 2.0033], "text": "Redmond", "confidence": 1}]}, {"boundingBox": [0.8893, + 2.0589, 1.5202, 2.0589, 1.5202, 2.1733, 0.8893, 2.1733], "text": "Redmond", + "appearance": {"style": {"name": "other", "confidence": 1}}, "words": [{"boundingBox": + [0.8893, 2.0589, 1.5202, 2.0589, 1.5202, 2.1733, 0.8893, 2.1733], "text": + "Redmond", "confidence": 1}]}, {"boundingBox": [6.0091, 2.1166, 6.9389, 2.1166, + 6.9389, 2.2233, 6.0091, 2.2233], "text": "555-555-5555", "appearance": {"style": + {"name": "other", "confidence": 1}}, "words": [{"boundingBox": [6.0091, 2.1166, + 6.9389, 2.1166, 6.9389, 2.2233, 6.0091, 2.2233], "text": "555-555-5555", "confidence": + 1}]}, {"boundingBox": [0.8835, 2.2866, 1.8128, 2.2866, 1.8128, 2.3933, 0.8835, + 2.3933], "text": "555-555-5555", "appearance": {"style": {"name": "other", + "confidence": 1}}, "words": [{"boundingBox": [0.8835, 2.2866, 1.8128, 2.2866, + 1.8128, 2.3933, 0.8835, 2.3933], "text": "555-555-5555", "confidence": 1}]}, + {"boundingBox": [1.0815, 2.9928, 1.6055, 2.9928, 1.6055, 3.1083, 1.0815, 3.1083], + "text": "Art\u00edculo", "appearance": {"style": {"name": "other", "confidence": + 1}}, "words": [{"boundingBox": [1.0815, 2.9928, 1.6055, 2.9928, 1.6055, 3.1083, + 1.0815, 3.1083], "text": "Art\u00edculo", "confidence": 1}]}, {"boundingBox": + [3.2502, 2.9939, 3.8354, 2.9939, 3.8354, 3.1083, 3.2502, 3.1083], "text": + "Cantidad", "appearance": {"style": {"name": "other", "confidence": 1}}, "words": + [{"boundingBox": [3.2502, 2.9939, 3.8354, 2.9939, 3.8354, 3.1083, 3.2502, + 3.1083], "text": "Cantidad", "confidence": 1}]}, {"boundingBox": [5.4216, + 2.9989, 5.8248, 2.9989, 5.8248, 3.1083, 5.4216, 3.1083], "text": "Precio", + "appearance": {"style": {"name": "other", "confidence": 1}}, "words": [{"boundingBox": + [5.4216, 2.9989, 5.8248, 2.9989, 5.8248, 3.1083, 5.4216, 3.1083], "text": + "Precio", "confidence": 1}]}, {"boundingBox": [1.0925, 3.2111, 1.2608, 3.2111, + 1.2608, 3.3183, 1.0925, 3.3183], "text": "Un", "appearance": {"style": {"name": + "other", "confidence": 1}}, "words": [{"boundingBox": [1.0925, 3.2111, 1.2608, + 3.2111, 1.2608, 3.3183, 1.0925, 3.3183], "text": "Un", "confidence": 1}]}, + {"boundingBox": [3.2565, 3.2109, 3.3179, 3.2109, 3.3179, 3.3169, 3.2565, 3.3169], + "text": "1", "appearance": {"style": {"name": "other", "confidence": 1}}, + "words": [{"boundingBox": [3.2565, 3.2109, 3.3179, 3.2109, 3.3179, 3.3169, + 3.2565, 3.3169], "text": "1", "confidence": 1}]}, {"boundingBox": [5.4218, + 3.2101, 5.78, 3.2101, 5.78, 3.3183, 5.4218, 3.3183], "text": "10.99", "appearance": + {"style": {"name": "other", "confidence": 1}}, "words": [{"boundingBox": [5.4218, + 3.2101, 5.78, 3.2101, 5.78, 3.3183, 5.4218, 3.3183], "text": "10.99", "confidence": + 1}]}, {"boundingBox": [1.0927, 3.422, 1.162, 3.422, 1.162, 3.5274, 1.0927, + 3.5274], "text": "B", "appearance": {"style": {"name": "other", "confidence": + 1}}, "words": [{"boundingBox": [1.0927, 3.422, 1.162, 3.422, 1.162, 3.5274, + 1.0927, 3.5274], "text": "B", "confidence": 1}]}, {"boundingBox": [3.2517, + 3.4205, 3.3175, 3.4205, 3.3175, 3.5274, 3.2517, 3.5274], "text": "2", "appearance": + {"style": {"name": "other", "confidence": 1}}, "words": [{"boundingBox": [3.2517, + 3.4205, 3.3175, 3.4205, 3.3175, 3.5274, 3.2517, 3.5274], "text": "2", "confidence": + 1}]}, {"boundingBox": [5.4218, 3.4205, 5.7806, 3.4205, 5.7806, 3.5287, 5.4218, + 3.5287], "text": "14.67", "appearance": {"style": {"name": "other", "confidence": + 1}}, "words": [{"boundingBox": [5.4218, 3.4205, 5.7806, 3.4205, 5.7806, 3.5287, + 5.4218, 3.5287], "text": "14.67", "confidence": 1}]}, {"boundingBox": [1.0865, + 3.6307, 1.163, 3.6307, 1.163, 3.7385, 1.0865, 3.7385], "text": "C", "appearance": + {"style": {"name": "other", "confidence": 1}}, "words": [{"boundingBox": [1.0865, + 3.6307, 1.163, 3.6307, 1.163, 3.7385, 1.0865, 3.7385], "text": "C", "confidence": + 1}]}, {"boundingBox": [3.2462, 3.6315, 3.322, 3.6315, 3.322, 3.7377, 3.2462, + 3.7377], "text": "4", "appearance": {"style": {"name": "other", "confidence": + 1}}, "words": [{"boundingBox": [3.2462, 3.6315, 3.322, 3.6315, 3.322, 3.7377, + 3.2462, 3.7377], "text": "4", "confidence": 1}]}, {"boundingBox": [5.4218, + 3.6305, 5.7818, 3.6305, 5.7818, 3.7387, 5.4218, 3.7387], "text": "15.66", + "appearance": {"style": {"name": "other", "confidence": 1}}, "words": [{"boundingBox": + [5.4218, 3.6305, 5.7818, 3.6305, 5.7818, 3.7387, 5.4218, 3.7387], "text": + "15.66", "confidence": 1}]}, {"boundingBox": [1.0927, 3.8437, 1.1737, 3.8437, + 1.1737, 3.949, 1.0927, 3.949], "text": "D", "appearance": {"style": {"name": + "other", "confidence": 1}}, "words": [{"boundingBox": [1.0927, 3.8437, 1.1737, + 3.8437, 1.1737, 3.949, 1.0927, 3.949], "text": "D", "confidence": 1}]}, {"boundingBox": + [3.2565, 3.843, 3.3179, 3.843, 3.3179, 3.949, 3.2565, 3.949], "text": "1", + "appearance": {"style": {"name": "other", "confidence": 1}}, "words": [{"boundingBox": + [3.2565, 3.843, 3.3179, 3.843, 3.3179, 3.949, 3.2565, 3.949], "text": "1", + "confidence": 1}]}, {"boundingBox": [5.4218, 3.8422, 5.7826, 3.8422, 5.7826, + 3.9504, 5.4218, 3.9504], "text": "12.00", "appearance": {"style": {"name": + "other", "confidence": 1}}, "words": [{"boundingBox": [5.4218, 3.8422, 5.7826, + 3.8422, 5.7826, 3.9504, 5.4218, 3.9504], "text": "12.00", "confidence": 1}]}, + {"boundingBox": [1.0927, 4.0537, 1.1513, 4.0537, 1.1513, 4.159, 1.0927, 4.159], + "text": "E", "appearance": {"style": {"name": "other", "confidence": 1}}, + "words": [{"boundingBox": [1.0927, 4.0537, 1.1513, 4.0537, 1.1513, 4.159, + 1.0927, 4.159], "text": "E", "confidence": 1}]}, {"boundingBox": [3.2462, + 4.0532, 3.322, 4.0532, 3.322, 4.1594, 3.2462, 4.1594], "text": "4", "appearance": + {"style": {"name": "other", "confidence": 1}}, "words": [{"boundingBox": [3.2462, + 4.0532, 3.322, 4.0532, 3.322, 4.1594, 3.2462, 4.1594], "text": "4", "confidence": + 1}]}, {"boundingBox": [5.4218, 4.0522, 5.7826, 4.0522, 5.7826, 4.1604, 5.4218, + 4.1604], "text": "10.00", "appearance": {"style": {"name": "other", "confidence": + 1}}, "words": [{"boundingBox": [5.4218, 4.0522, 5.7826, 4.0522, 5.7826, 4.1604, + 5.4218, 4.1604], "text": "10.00", "confidence": 1}]}, {"boundingBox": [1.0927, + 4.2637, 1.148, 4.2637, 1.148, 4.3694, 1.0927, 4.3694], "text": "F", "appearance": + {"style": {"name": "other", "confidence": 1}}, "words": [{"boundingBox": [1.0927, + 4.2637, 1.148, 4.2637, 1.148, 4.3694, 1.0927, 4.3694], "text": "F", "confidence": + 1}]}, {"boundingBox": [3.251, 4.2622, 3.3202, 4.2622, 3.3202, 4.3704, 3.251, + 4.3704], "text": "6", "appearance": {"style": {"name": "other", "confidence": + 1}}, "words": [{"boundingBox": [3.251, 4.2622, 3.3202, 4.2622, 3.3202, 4.3704, + 3.251, 4.3704], "text": "6", "confidence": 1}]}, {"boundingBox": [5.4218, + 4.2622, 5.7826, 4.2622, 5.7826, 4.3704, 5.4218, 4.3704], "text": "12.00", + "appearance": {"style": {"name": "other", "confidence": 1}}, "words": [{"boundingBox": + [5.4218, 4.2622, 5.7826, 4.2622, 5.7826, 4.3704, 5.4218, 4.3704], "text": + "12.00", "confidence": 1}]}, {"boundingBox": [1.086, 4.4722, 1.1718, 4.4722, + 1.1718, 4.5804, 1.086, 4.5804], "text": "G", "appearance": {"style": {"name": + "other", "confidence": 1}}, "words": [{"boundingBox": [1.086, 4.4722, 1.1718, + 4.4722, 1.1718, 4.5804, 1.086, 4.5804], "text": "G", "confidence": 1}]}, {"boundingBox": + [3.249, 4.4722, 3.32, 4.4722, 3.32, 4.5804, 3.249, 4.5804], "text": "8", "appearance": + {"style": {"name": "other", "confidence": 1}}, "words": [{"boundingBox": [3.249, + 4.4722, 3.32, 4.4722, 3.32, 4.5804, 3.249, 4.5804], "text": "8", "confidence": + 1}]}, {"boundingBox": [5.417, 4.4722, 5.7826, 4.4722, 5.7826, 4.5804, 5.417, + 4.5804], "text": "22.00", "appearance": {"style": {"name": "other", "confidence": + 1}}, "words": [{"boundingBox": [5.417, 4.4722, 5.7826, 4.4722, 5.7826, 4.5804, + 5.417, 4.5804], "text": "22.00", "confidence": 1}]}, {"boundingBox": [5.5061, + 4.8957, 6.6328, 4.8957, 6.6328, 5.0107, 5.5061, 5.0107], "text": "Subtotal: + 300.00", "appearance": {"style": {"name": "other", "confidence": 1}}, "words": + [{"boundingBox": [5.5061, 4.8957, 6.1233, 4.8957, 6.1233, 5.0107, 5.5061, + 5.0107], "text": "Subtotal:", "confidence": 1}, {"boundingBox": [6.179, 4.9019, + 6.6328, 4.9019, 6.6328, 5.0107, 6.179, 5.0107], "text": "300.00", "confidence": + 1}]}, {"boundingBox": [5.5125, 5.1219, 6.6193, 5.1219, 6.6193, 5.2584, 5.5125, + 5.2584], "text": "Impuesto: 30.00", "appearance": {"style": {"name": "other", + "confidence": 1}}, "words": [{"boundingBox": [5.5125, 5.1232, 6.1943, 5.1232, + 6.1943, 5.2584, 5.5125, 5.2584], "text": "Impuesto:", "confidence": 1}, {"boundingBox": + [6.2488, 5.1219, 6.6193, 5.1219, 6.6193, 5.2307, 6.2488, 5.2307], "text": + "30.00", "confidence": 1}]}, {"boundingBox": [5.5075, 5.3385, 6.5965, 5.3385, + 6.5965, 5.4785, 5.5075, 5.4785], "text": "Consejo: 100.00", "appearance": + {"style": {"name": "other", "confidence": 1}}, "words": [{"boundingBox": [5.5075, + 5.3385, 6.0866, 5.3385, 6.0866, 5.4785, 5.5075, 5.4785], "text": "Consejo:", + "confidence": 1}, {"boundingBox": [6.1473, 5.3419, 6.5965, 5.3419, 6.5965, + 5.4507, 6.1473, 5.4507], "text": "100.00", "confidence": 1}]}, {"boundingBox": + [5.502, 5.554, 6.3998, 5.554, 6.3998, 5.669, 5.502, 5.669], "text": "Total: + 430.00", "appearance": {"style": {"name": "other", "confidence": 1}}, "words": + [{"boundingBox": [5.502, 5.554, 5.89, 5.554, 5.89, 5.669, 5.502, 5.669], "text": + "Total:", "confidence": 1}, {"boundingBox": [5.9416, 5.5602, 6.3998, 5.5602, + 6.3998, 5.669, 5.9416, 5.669], "text": "430.00", "confidence": 1}]}, {"boundingBox": + [1.0118, 6.8716, 3.5035, 6.8716, 3.5035, 7.0155, 1.0118, 7.0155], "text": + "Firma: ____Bilbo Bols\u00f3n__________", "appearance": {"style": {"name": + "other", "confidence": 1}}, "words": [{"boundingBox": [1.0118, 6.8755, 1.431, + 6.8755, 1.431, 6.9876, 1.0118, 6.9876], "text": "Firma:", "confidence": 1}, + {"boundingBox": [1.4793, 6.8726, 2.1603, 6.8726, 2.1603, 7.0155, 1.4793, 7.0155], + "text": "____Bilbo", "confidence": 1}, {"boundingBox": [2.2146, 6.8716, 3.5035, + 6.8716, 3.5035, 7.0155, 2.2146, 7.0155], "text": "Bols\u00f3n__________", + "confidence": 1}]}]}], "pageResults": [{"page": 1, "tables": [{"rows": 8, + "columns": 3, "cells": [{"rowIndex": 0, "columnIndex": 0, "text": "Art\u00edculo", + "boundingBox": [0.9976, 2.9416, 3.1582, 2.9416, 3.1582, 3.1546, 0.9976, 3.1546], + "elements": ["#/readResults/0/lines/10/words/0"]}, {"rowIndex": 0, "columnIndex": + 1, "text": "Cantidad", "boundingBox": [3.1582, 2.9416, 5.3255, 2.9416, 5.3255, + 3.1546, 3.1582, 3.1546], "elements": ["#/readResults/0/lines/11/words/0"]}, + {"rowIndex": 0, "columnIndex": 2, "text": "Precio", "boundingBox": [5.3255, + 2.9416, 7.4928, 2.9478, 7.4928, 3.1546, 5.3255, 3.1546], "elements": ["#/readResults/0/lines/12/words/0"]}, + {"rowIndex": 1, "columnIndex": 0, "text": "Un", "boundingBox": [0.9976, 3.1546, + 3.1582, 3.1546, 3.1582, 3.3614, 0.9909, 3.3614], "elements": ["#/readResults/0/lines/13/words/0"]}, + {"rowIndex": 1, "columnIndex": 1, "text": "1", "boundingBox": [3.1582, 3.1546, + 5.3255, 3.1546, 5.3322, 3.3614, 3.1582, 3.3614], "elements": ["#/readResults/0/lines/14/words/0"]}, + {"rowIndex": 1, "columnIndex": 2, "text": "10.99", "boundingBox": [5.3255, + 3.1546, 7.4928, 3.1546, 7.4928, 3.3677, 5.3322, 3.3614], "elements": ["#/readResults/0/lines/15/words/0"]}, + {"rowIndex": 2, "columnIndex": 0, "text": "B", "boundingBox": [0.9909, 3.3614, + 3.1582, 3.3614, 3.1582, 3.5682, 0.9909, 3.5745], "elements": ["#/readResults/0/lines/16/words/0"]}, + {"rowIndex": 2, "columnIndex": 1, "text": "2", "boundingBox": [3.1582, 3.3614, + 5.3322, 3.3614, 5.3322, 3.5682, 3.1582, 3.5682], "elements": ["#/readResults/0/lines/17/words/0"]}, + {"rowIndex": 2, "columnIndex": 2, "text": "14.67", "boundingBox": [5.3322, + 3.3614, 7.4928, 3.3677, 7.4928, 3.5745, 5.3322, 3.5682], "elements": ["#/readResults/0/lines/18/words/0"]}, + {"rowIndex": 3, "columnIndex": 0, "text": "C", "boundingBox": [0.9909, 3.5745, + 3.1582, 3.5682, 3.1582, 3.7813, 0.9909, 3.7813], "elements": ["#/readResults/0/lines/19/words/0"]}, + {"rowIndex": 3, "columnIndex": 1, "text": "4", "boundingBox": [3.1582, 3.5682, + 5.3322, 3.5682, 5.3322, 3.7813, 3.1582, 3.7813], "elements": ["#/readResults/0/lines/20/words/0"]}, + {"rowIndex": 3, "columnIndex": 2, "text": "15.66", "boundingBox": [5.3322, + 3.5682, 7.4928, 3.5745, 7.4928, 3.7813, 5.3322, 3.7813], "elements": ["#/readResults/0/lines/21/words/0"]}, + {"rowIndex": 4, "columnIndex": 0, "text": "D", "boundingBox": [0.9909, 3.7813, + 3.1582, 3.7813, 3.1582, 3.988, 0.9909, 3.988], "elements": ["#/readResults/0/lines/22/words/0"]}, + {"rowIndex": 4, "columnIndex": 1, "text": "1", "boundingBox": [3.1582, 3.7813, + 5.3322, 3.7813, 5.3322, 3.988, 3.1582, 3.988], "elements": ["#/readResults/0/lines/23/words/0"]}, + {"rowIndex": 4, "columnIndex": 2, "text": "12.00", "boundingBox": [5.3322, + 3.7813, 7.4928, 3.7813, 7.4928, 3.9943, 5.3322, 3.988], "elements": ["#/readResults/0/lines/24/words/0"]}, + {"rowIndex": 5, "columnIndex": 0, "text": "E", "boundingBox": [0.9909, 3.988, + 3.1582, 3.988, 3.1582, 4.1948, 0.9909, 4.2011], "elements": ["#/readResults/0/lines/25/words/0"]}, + {"rowIndex": 5, "columnIndex": 1, "text": "4", "boundingBox": [3.1582, 3.988, + 5.3322, 3.988, 5.3322, 4.2011, 3.1582, 4.1948], "elements": ["#/readResults/0/lines/26/words/0"]}, + {"rowIndex": 5, "columnIndex": 2, "text": "10.00", "boundingBox": [5.3322, + 3.988, 7.4928, 3.9943, 7.4928, 4.2011, 5.3322, 4.2011], "elements": ["#/readResults/0/lines/27/words/0"]}, + {"rowIndex": 6, "columnIndex": 0, "text": "F", "boundingBox": [0.9909, 4.2011, + 3.1582, 4.1948, 3.1582, 4.4079, 0.9909, 4.4079], "elements": ["#/readResults/0/lines/28/words/0"]}, + {"rowIndex": 6, "columnIndex": 1, "text": "6", "boundingBox": [3.1582, 4.1948, + 5.3322, 4.2011, 5.3322, 4.4079, 3.1582, 4.4079], "elements": ["#/readResults/0/lines/29/words/0"]}, + {"rowIndex": 6, "columnIndex": 2, "text": "12.00", "boundingBox": [5.3322, + 4.2011, 7.4928, 4.2011, 7.4928, 4.4141, 5.3322, 4.4079], "elements": ["#/readResults/0/lines/30/words/0"]}, + {"rowIndex": 7, "columnIndex": 0, "text": "G", "boundingBox": [0.9909, 4.4079, + 3.1582, 4.4079, 3.1582, 4.6272, 0.9909, 4.6272], "elements": ["#/readResults/0/lines/31/words/0"]}, + {"rowIndex": 7, "columnIndex": 1, "text": "8", "boundingBox": [3.1582, 4.4079, + 5.3322, 4.4079, 5.3322, 4.6272, 3.1582, 4.6272], "elements": ["#/readResults/0/lines/32/words/0"]}, + {"rowIndex": 7, "columnIndex": 2, "text": "22.00", "boundingBox": [5.3322, + 4.4079, 7.4928, 4.4141, 7.4928, 4.6272, 5.3322, 4.6272], "elements": ["#/readResults/0/lines/33/words/0"]}], + "boundingBox": [0.9959, 2.9319, 7.4973, 2.9322, 7.497, 4.6319, 0.9945, 4.6311]}]}]}}' + headers: + apim-request-id: + - 173328eb-17f8-4cca-a372-7f3dce118b7e + content-length: + - '15907' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 17:48:30 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '26' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_content_from_url_async.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_content_from_url_async.test_pages_kwarg_specified.yaml new file mode 100644 index 000000000000..e747e255a0f3 --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_content_from_url_async.test_pages_kwarg_specified.yaml @@ -0,0 +1,269 @@ +interactions: +- request: + body: 'b''{"source": "blob_sas_url"}''' + headers: + Accept: + - application/json + Content-Length: + - '232' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/layout/analyze?pages=1&readingOrder=basic + response: + body: + string: '' + headers: + apim-request-id: 6ee8063f-696c-4072-8fc3-2939fe0e5471 + content-length: '0' + date: Thu, 11 Mar 2021 17:48:04 GMT + operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/layout/analyzeResults/6ee8063f-696c-4072-8fc3-2939fe0e5471 + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '92' + status: + code: 202 + message: Accepted + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/layout/analyze?pages=1&readingOrder=basic +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/layout/analyzeResults/6ee8063f-696c-4072-8fc3-2939fe0e5471 + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-03-11T17:48:05Z", + "lastUpdatedDateTime": "2021-03-11T17:48:10Z", "analyzeResult": {"version": + "2.1.0", "readResults": [{"page": 1, "angle": 0, "width": 8.5, "height": 11, + "unit": "inch", "lines": [{"boundingBox": [0.8917, 1.1119, 2.5309, 1.1119, + 2.5309, 1.2798, 0.8917, 1.2798], "text": "Empresa una factura", "appearance": + {"style": {"name": "other", "confidence": 1}}, "words": [{"boundingBox": [0.8917, + 1.122, 1.5491, 1.122, 1.5491, 1.2798, 0.8917, 1.2798], "text": "Empresa", + "confidence": 1}, {"boundingBox": [1.6193, 1.1528, 1.8907, 1.1528, 1.8907, + 1.2468, 1.6193, 1.2468], "text": "una", "confidence": 1}, {"boundingBox": + [1.9855, 1.1119, 2.5309, 1.1119, 2.5309, 1.2468, 1.9855, 1.2468], "text": + "factura", "confidence": 1}]}, {"boundingBox": [6.0196, 1.0719, 7.1762, 1.0719, + 7.1762, 1.2512, 6.0196, 1.2512], "text": "Factura para:", "appearance": {"style": + {"name": "other", "confidence": 1}}, "words": [{"boundingBox": [6.0196, 1.0719, + 6.6611, 1.0719, 6.6611, 1.2137, 6.0196, 1.2137], "text": "Factura", "confidence": + 1}, {"boundingBox": [6.744, 1.1069, 7.1762, 1.1069, 7.1762, 1.2512, 6.744, + 1.2512], "text": "para:", "confidence": 1}]}, {"boundingBox": [0.8888, 1.4782, + 1.675, 1.4782, 1.675, 1.6139, 0.8888, 1.6139], "text": "Direcci\u00f3n:", + "appearance": {"style": {"name": "other", "confidence": 1}}, "words": [{"boundingBox": + [0.8888, 1.4782, 1.675, 1.4782, 1.675, 1.6139, 0.8888, 1.6139], "text": "Direcci\u00f3n:", + "confidence": 1}]}, {"boundingBox": [6.015, 1.4478, 6.8276, 1.4478, 6.8276, + 1.5633, 6.015, 1.5633], "text": "Bilbo Bols\u00f3n", "appearance": {"style": + {"name": "other", "confidence": 1}}, "words": [{"boundingBox": [6.015, 1.4486, + 6.3363, 1.4486, 6.3363, 1.5633, 6.015, 1.5633], "text": "Bilbo", "confidence": + 1}, {"boundingBox": [6.3963, 1.4478, 6.8276, 1.4478, 6.8276, 1.5633, 6.3963, + 1.5633], "text": "Bols\u00f3n", "confidence": 1}]}, {"boundingBox": [6.0151, + 1.6686, 7.1031, 1.6686, 7.1031, 1.7833, 6.0151, 1.7833], "text": "123 Hobbit + Lane", "appearance": {"style": {"name": "other", "confidence": 1}}, "words": + [{"boundingBox": [6.0151, 1.6751, 6.2451, 1.6751, 6.2451, 1.7833, 6.0151, + 1.7833], "text": "123", "confidence": 1}, {"boundingBox": [6.308, 1.6686, + 6.7475, 1.6686, 6.7475, 1.7833, 6.308, 1.7833], "text": "Hobbit", "confidence": + 1}, {"boundingBox": [6.8056, 1.6761, 7.1031, 1.6761, 7.1031, 1.7833, 6.8056, + 1.7833], "text": "Lane", "confidence": 1}]}, {"boundingBox": [0.8835, 1.8456, + 1.7162, 1.8456, 1.7162, 1.9549, 0.8835, 1.9549], "text": "567 Main St.", "appearance": + {"style": {"name": "other", "confidence": 1}}, "words": [{"boundingBox": [0.8835, + 1.8468, 1.1218, 1.8468, 1.1218, 1.9549, 0.8835, 1.9549], "text": "567", "confidence": + 1}, {"boundingBox": [1.1808, 1.8456, 1.5037, 1.8456, 1.5037, 1.9549, 1.1808, + 1.9549], "text": "Main", "confidence": 1}, {"boundingBox": [1.559, 1.8468, + 1.7162, 1.8468, 1.7162, 1.9549, 1.559, 1.9549], "text": "St.", "confidence": + 1}]}, {"boundingBox": [6.015, 1.8889, 6.6458, 1.8889, 6.6458, 2.0033, 6.015, + 2.0033], "text": "Redmond", "appearance": {"style": {"name": "other", "confidence": + 1}}, "words": [{"boundingBox": [6.015, 1.8889, 6.6458, 1.8889, 6.6458, 2.0033, + 6.015, 2.0033], "text": "Redmond", "confidence": 1}]}, {"boundingBox": [0.8893, + 2.0589, 1.5202, 2.0589, 1.5202, 2.1733, 0.8893, 2.1733], "text": "Redmond", + "appearance": {"style": {"name": "other", "confidence": 1}}, "words": [{"boundingBox": + [0.8893, 2.0589, 1.5202, 2.0589, 1.5202, 2.1733, 0.8893, 2.1733], "text": + "Redmond", "confidence": 1}]}, {"boundingBox": [6.0091, 2.1166, 6.9389, 2.1166, + 6.9389, 2.2233, 6.0091, 2.2233], "text": "555-555-5555", "appearance": {"style": + {"name": "other", "confidence": 1}}, "words": [{"boundingBox": [6.0091, 2.1166, + 6.9389, 2.1166, 6.9389, 2.2233, 6.0091, 2.2233], "text": "555-555-5555", "confidence": + 1}]}, {"boundingBox": [0.8835, 2.2866, 1.8128, 2.2866, 1.8128, 2.3933, 0.8835, + 2.3933], "text": "555-555-5555", "appearance": {"style": {"name": "other", + "confidence": 1}}, "words": [{"boundingBox": [0.8835, 2.2866, 1.8128, 2.2866, + 1.8128, 2.3933, 0.8835, 2.3933], "text": "555-555-5555", "confidence": 1}]}, + {"boundingBox": [1.0815, 2.9928, 1.6055, 2.9928, 1.6055, 3.1083, 1.0815, 3.1083], + "text": "Art\u00edculo", "appearance": {"style": {"name": "other", "confidence": + 1}}, "words": [{"boundingBox": [1.0815, 2.9928, 1.6055, 2.9928, 1.6055, 3.1083, + 1.0815, 3.1083], "text": "Art\u00edculo", "confidence": 1}]}, {"boundingBox": + [3.2502, 2.9939, 3.8354, 2.9939, 3.8354, 3.1083, 3.2502, 3.1083], "text": + "Cantidad", "appearance": {"style": {"name": "other", "confidence": 1}}, "words": + [{"boundingBox": [3.2502, 2.9939, 3.8354, 2.9939, 3.8354, 3.1083, 3.2502, + 3.1083], "text": "Cantidad", "confidence": 1}]}, {"boundingBox": [5.4216, + 2.9989, 5.8248, 2.9989, 5.8248, 3.1083, 5.4216, 3.1083], "text": "Precio", + "appearance": {"style": {"name": "other", "confidence": 1}}, "words": [{"boundingBox": + [5.4216, 2.9989, 5.8248, 2.9989, 5.8248, 3.1083, 5.4216, 3.1083], "text": + "Precio", "confidence": 1}]}, {"boundingBox": [1.0925, 3.2111, 1.2608, 3.2111, + 1.2608, 3.3183, 1.0925, 3.3183], "text": "Un", "appearance": {"style": {"name": + "other", "confidence": 1}}, "words": [{"boundingBox": [1.0925, 3.2111, 1.2608, + 3.2111, 1.2608, 3.3183, 1.0925, 3.3183], "text": "Un", "confidence": 1}]}, + {"boundingBox": [3.2565, 3.2109, 3.3179, 3.2109, 3.3179, 3.3169, 3.2565, 3.3169], + "text": "1", "appearance": {"style": {"name": "other", "confidence": 1}}, + "words": [{"boundingBox": [3.2565, 3.2109, 3.3179, 3.2109, 3.3179, 3.3169, + 3.2565, 3.3169], "text": "1", "confidence": 1}]}, {"boundingBox": [5.4218, + 3.2101, 5.78, 3.2101, 5.78, 3.3183, 5.4218, 3.3183], "text": "10.99", "appearance": + {"style": {"name": "other", "confidence": 1}}, "words": [{"boundingBox": [5.4218, + 3.2101, 5.78, 3.2101, 5.78, 3.3183, 5.4218, 3.3183], "text": "10.99", "confidence": + 1}]}, {"boundingBox": [1.0927, 3.422, 1.162, 3.422, 1.162, 3.5274, 1.0927, + 3.5274], "text": "B", "appearance": {"style": {"name": "other", "confidence": + 1}}, "words": [{"boundingBox": [1.0927, 3.422, 1.162, 3.422, 1.162, 3.5274, + 1.0927, 3.5274], "text": "B", "confidence": 1}]}, {"boundingBox": [3.2517, + 3.4205, 3.3175, 3.4205, 3.3175, 3.5274, 3.2517, 3.5274], "text": "2", "appearance": + {"style": {"name": "other", "confidence": 1}}, "words": [{"boundingBox": [3.2517, + 3.4205, 3.3175, 3.4205, 3.3175, 3.5274, 3.2517, 3.5274], "text": "2", "confidence": + 1}]}, {"boundingBox": [5.4218, 3.4205, 5.7806, 3.4205, 5.7806, 3.5287, 5.4218, + 3.5287], "text": "14.67", "appearance": {"style": {"name": "other", "confidence": + 1}}, "words": [{"boundingBox": [5.4218, 3.4205, 5.7806, 3.4205, 5.7806, 3.5287, + 5.4218, 3.5287], "text": "14.67", "confidence": 1}]}, {"boundingBox": [1.0865, + 3.6307, 1.163, 3.6307, 1.163, 3.7385, 1.0865, 3.7385], "text": "C", "appearance": + {"style": {"name": "other", "confidence": 1}}, "words": [{"boundingBox": [1.0865, + 3.6307, 1.163, 3.6307, 1.163, 3.7385, 1.0865, 3.7385], "text": "C", "confidence": + 1}]}, {"boundingBox": [3.2462, 3.6315, 3.322, 3.6315, 3.322, 3.7377, 3.2462, + 3.7377], "text": "4", "appearance": {"style": {"name": "other", "confidence": + 1}}, "words": [{"boundingBox": [3.2462, 3.6315, 3.322, 3.6315, 3.322, 3.7377, + 3.2462, 3.7377], "text": "4", "confidence": 1}]}, {"boundingBox": [5.4218, + 3.6305, 5.7818, 3.6305, 5.7818, 3.7387, 5.4218, 3.7387], "text": "15.66", + "appearance": {"style": {"name": "other", "confidence": 1}}, "words": [{"boundingBox": + [5.4218, 3.6305, 5.7818, 3.6305, 5.7818, 3.7387, 5.4218, 3.7387], "text": + "15.66", "confidence": 1}]}, {"boundingBox": [1.0927, 3.8437, 1.1737, 3.8437, + 1.1737, 3.949, 1.0927, 3.949], "text": "D", "appearance": {"style": {"name": + "other", "confidence": 1}}, "words": [{"boundingBox": [1.0927, 3.8437, 1.1737, + 3.8437, 1.1737, 3.949, 1.0927, 3.949], "text": "D", "confidence": 1}]}, {"boundingBox": + [3.2565, 3.843, 3.3179, 3.843, 3.3179, 3.949, 3.2565, 3.949], "text": "1", + "appearance": {"style": {"name": "other", "confidence": 1}}, "words": [{"boundingBox": + [3.2565, 3.843, 3.3179, 3.843, 3.3179, 3.949, 3.2565, 3.949], "text": "1", + "confidence": 1}]}, {"boundingBox": [5.4218, 3.8422, 5.7826, 3.8422, 5.7826, + 3.9504, 5.4218, 3.9504], "text": "12.00", "appearance": {"style": {"name": + "other", "confidence": 1}}, "words": [{"boundingBox": [5.4218, 3.8422, 5.7826, + 3.8422, 5.7826, 3.9504, 5.4218, 3.9504], "text": "12.00", "confidence": 1}]}, + {"boundingBox": [1.0927, 4.0537, 1.1513, 4.0537, 1.1513, 4.159, 1.0927, 4.159], + "text": "E", "appearance": {"style": {"name": "other", "confidence": 1}}, + "words": [{"boundingBox": [1.0927, 4.0537, 1.1513, 4.0537, 1.1513, 4.159, + 1.0927, 4.159], "text": "E", "confidence": 1}]}, {"boundingBox": [3.2462, + 4.0532, 3.322, 4.0532, 3.322, 4.1594, 3.2462, 4.1594], "text": "4", "appearance": + {"style": {"name": "other", "confidence": 1}}, "words": [{"boundingBox": [3.2462, + 4.0532, 3.322, 4.0532, 3.322, 4.1594, 3.2462, 4.1594], "text": "4", "confidence": + 1}]}, {"boundingBox": [5.4218, 4.0522, 5.7826, 4.0522, 5.7826, 4.1604, 5.4218, + 4.1604], "text": "10.00", "appearance": {"style": {"name": "other", "confidence": + 1}}, "words": [{"boundingBox": [5.4218, 4.0522, 5.7826, 4.0522, 5.7826, 4.1604, + 5.4218, 4.1604], "text": "10.00", "confidence": 1}]}, {"boundingBox": [1.0927, + 4.2637, 1.148, 4.2637, 1.148, 4.3694, 1.0927, 4.3694], "text": "F", "appearance": + {"style": {"name": "other", "confidence": 1}}, "words": [{"boundingBox": [1.0927, + 4.2637, 1.148, 4.2637, 1.148, 4.3694, 1.0927, 4.3694], "text": "F", "confidence": + 1}]}, {"boundingBox": [3.251, 4.2622, 3.3202, 4.2622, 3.3202, 4.3704, 3.251, + 4.3704], "text": "6", "appearance": {"style": {"name": "other", "confidence": + 1}}, "words": [{"boundingBox": [3.251, 4.2622, 3.3202, 4.2622, 3.3202, 4.3704, + 3.251, 4.3704], "text": "6", "confidence": 1}]}, {"boundingBox": [5.4218, + 4.2622, 5.7826, 4.2622, 5.7826, 4.3704, 5.4218, 4.3704], "text": "12.00", + "appearance": {"style": {"name": "other", "confidence": 1}}, "words": [{"boundingBox": + [5.4218, 4.2622, 5.7826, 4.2622, 5.7826, 4.3704, 5.4218, 4.3704], "text": + "12.00", "confidence": 1}]}, {"boundingBox": [1.086, 4.4722, 1.1718, 4.4722, + 1.1718, 4.5804, 1.086, 4.5804], "text": "G", "appearance": {"style": {"name": + "other", "confidence": 1}}, "words": [{"boundingBox": [1.086, 4.4722, 1.1718, + 4.4722, 1.1718, 4.5804, 1.086, 4.5804], "text": "G", "confidence": 1}]}, {"boundingBox": + [3.249, 4.4722, 3.32, 4.4722, 3.32, 4.5804, 3.249, 4.5804], "text": "8", "appearance": + {"style": {"name": "other", "confidence": 1}}, "words": [{"boundingBox": [3.249, + 4.4722, 3.32, 4.4722, 3.32, 4.5804, 3.249, 4.5804], "text": "8", "confidence": + 1}]}, {"boundingBox": [5.417, 4.4722, 5.7826, 4.4722, 5.7826, 4.5804, 5.417, + 4.5804], "text": "22.00", "appearance": {"style": {"name": "other", "confidence": + 1}}, "words": [{"boundingBox": [5.417, 4.4722, 5.7826, 4.4722, 5.7826, 4.5804, + 5.417, 4.5804], "text": "22.00", "confidence": 1}]}, {"boundingBox": [5.5061, + 4.8957, 6.6328, 4.8957, 6.6328, 5.0107, 5.5061, 5.0107], "text": "Subtotal: + 300.00", "appearance": {"style": {"name": "other", "confidence": 1}}, "words": + [{"boundingBox": [5.5061, 4.8957, 6.1233, 4.8957, 6.1233, 5.0107, 5.5061, + 5.0107], "text": "Subtotal:", "confidence": 1}, {"boundingBox": [6.179, 4.9019, + 6.6328, 4.9019, 6.6328, 5.0107, 6.179, 5.0107], "text": "300.00", "confidence": + 1}]}, {"boundingBox": [5.5125, 5.1219, 6.6193, 5.1219, 6.6193, 5.2584, 5.5125, + 5.2584], "text": "Impuesto: 30.00", "appearance": {"style": {"name": "other", + "confidence": 1}}, "words": [{"boundingBox": [5.5125, 5.1232, 6.1943, 5.1232, + 6.1943, 5.2584, 5.5125, 5.2584], "text": "Impuesto:", "confidence": 1}, {"boundingBox": + [6.2488, 5.1219, 6.6193, 5.1219, 6.6193, 5.2307, 6.2488, 5.2307], "text": + "30.00", "confidence": 1}]}, {"boundingBox": [5.5075, 5.3385, 6.5965, 5.3385, + 6.5965, 5.4785, 5.5075, 5.4785], "text": "Consejo: 100.00", "appearance": + {"style": {"name": "other", "confidence": 1}}, "words": [{"boundingBox": [5.5075, + 5.3385, 6.0866, 5.3385, 6.0866, 5.4785, 5.5075, 5.4785], "text": "Consejo:", + "confidence": 1}, {"boundingBox": [6.1473, 5.3419, 6.5965, 5.3419, 6.5965, + 5.4507, 6.1473, 5.4507], "text": "100.00", "confidence": 1}]}, {"boundingBox": + [5.502, 5.554, 6.3998, 5.554, 6.3998, 5.669, 5.502, 5.669], "text": "Total: + 430.00", "appearance": {"style": {"name": "other", "confidence": 1}}, "words": + [{"boundingBox": [5.502, 5.554, 5.89, 5.554, 5.89, 5.669, 5.502, 5.669], "text": + "Total:", "confidence": 1}, {"boundingBox": [5.9416, 5.5602, 6.3998, 5.5602, + 6.3998, 5.669, 5.9416, 5.669], "text": "430.00", "confidence": 1}]}, {"boundingBox": + [1.0118, 6.8716, 3.5035, 6.8716, 3.5035, 7.0155, 1.0118, 7.0155], "text": + "Firma: ____Bilbo Bols\u00f3n__________", "appearance": {"style": {"name": + "other", "confidence": 1}}, "words": [{"boundingBox": [1.0118, 6.8755, 1.431, + 6.8755, 1.431, 6.9876, 1.0118, 6.9876], "text": "Firma:", "confidence": 1}, + {"boundingBox": [1.4793, 6.8726, 2.1603, 6.8726, 2.1603, 7.0155, 1.4793, 7.0155], + "text": "____Bilbo", "confidence": 1}, {"boundingBox": [2.2146, 6.8716, 3.5035, + 6.8716, 3.5035, 7.0155, 2.2146, 7.0155], "text": "Bols\u00f3n__________", + "confidence": 1}]}]}], "pageResults": [{"page": 1, "tables": [{"rows": 8, + "columns": 3, "cells": [{"rowIndex": 0, "columnIndex": 0, "text": "Art\u00edculo", + "boundingBox": [0.9976, 2.9416, 3.1582, 2.9416, 3.1582, 3.1546, 0.9976, 3.1546], + "elements": ["#/readResults/0/lines/10/words/0"]}, {"rowIndex": 0, "columnIndex": + 1, "text": "Cantidad", "boundingBox": [3.1582, 2.9416, 5.3255, 2.9416, 5.3255, + 3.1546, 3.1582, 3.1546], "elements": ["#/readResults/0/lines/11/words/0"]}, + {"rowIndex": 0, "columnIndex": 2, "text": "Precio", "boundingBox": [5.3255, + 2.9416, 7.4928, 2.9478, 7.4928, 3.1546, 5.3255, 3.1546], "elements": ["#/readResults/0/lines/12/words/0"]}, + {"rowIndex": 1, "columnIndex": 0, "text": "Un", "boundingBox": [0.9976, 3.1546, + 3.1582, 3.1546, 3.1582, 3.3614, 0.9909, 3.3614], "elements": ["#/readResults/0/lines/13/words/0"]}, + {"rowIndex": 1, "columnIndex": 1, "text": "1", "boundingBox": [3.1582, 3.1546, + 5.3255, 3.1546, 5.3322, 3.3614, 3.1582, 3.3614], "elements": ["#/readResults/0/lines/14/words/0"]}, + {"rowIndex": 1, "columnIndex": 2, "text": "10.99", "boundingBox": [5.3255, + 3.1546, 7.4928, 3.1546, 7.4928, 3.3677, 5.3322, 3.3614], "elements": ["#/readResults/0/lines/15/words/0"]}, + {"rowIndex": 2, "columnIndex": 0, "text": "B", "boundingBox": [0.9909, 3.3614, + 3.1582, 3.3614, 3.1582, 3.5682, 0.9909, 3.5745], "elements": ["#/readResults/0/lines/16/words/0"]}, + {"rowIndex": 2, "columnIndex": 1, "text": "2", "boundingBox": [3.1582, 3.3614, + 5.3322, 3.3614, 5.3322, 3.5682, 3.1582, 3.5682], "elements": ["#/readResults/0/lines/17/words/0"]}, + {"rowIndex": 2, "columnIndex": 2, "text": "14.67", "boundingBox": [5.3322, + 3.3614, 7.4928, 3.3677, 7.4928, 3.5745, 5.3322, 3.5682], "elements": ["#/readResults/0/lines/18/words/0"]}, + {"rowIndex": 3, "columnIndex": 0, "text": "C", "boundingBox": [0.9909, 3.5745, + 3.1582, 3.5682, 3.1582, 3.7813, 0.9909, 3.7813], "elements": ["#/readResults/0/lines/19/words/0"]}, + {"rowIndex": 3, "columnIndex": 1, "text": "4", "boundingBox": [3.1582, 3.5682, + 5.3322, 3.5682, 5.3322, 3.7813, 3.1582, 3.7813], "elements": ["#/readResults/0/lines/20/words/0"]}, + {"rowIndex": 3, "columnIndex": 2, "text": "15.66", "boundingBox": [5.3322, + 3.5682, 7.4928, 3.5745, 7.4928, 3.7813, 5.3322, 3.7813], "elements": ["#/readResults/0/lines/21/words/0"]}, + {"rowIndex": 4, "columnIndex": 0, "text": "D", "boundingBox": [0.9909, 3.7813, + 3.1582, 3.7813, 3.1582, 3.988, 0.9909, 3.988], "elements": ["#/readResults/0/lines/22/words/0"]}, + {"rowIndex": 4, "columnIndex": 1, "text": "1", "boundingBox": [3.1582, 3.7813, + 5.3322, 3.7813, 5.3322, 3.988, 3.1582, 3.988], "elements": ["#/readResults/0/lines/23/words/0"]}, + {"rowIndex": 4, "columnIndex": 2, "text": "12.00", "boundingBox": [5.3322, + 3.7813, 7.4928, 3.7813, 7.4928, 3.9943, 5.3322, 3.988], "elements": ["#/readResults/0/lines/24/words/0"]}, + {"rowIndex": 5, "columnIndex": 0, "text": "E", "boundingBox": [0.9909, 3.988, + 3.1582, 3.988, 3.1582, 4.1948, 0.9909, 4.2011], "elements": ["#/readResults/0/lines/25/words/0"]}, + {"rowIndex": 5, "columnIndex": 1, "text": "4", "boundingBox": [3.1582, 3.988, + 5.3322, 3.988, 5.3322, 4.2011, 3.1582, 4.1948], "elements": ["#/readResults/0/lines/26/words/0"]}, + {"rowIndex": 5, "columnIndex": 2, "text": "10.00", "boundingBox": [5.3322, + 3.988, 7.4928, 3.9943, 7.4928, 4.2011, 5.3322, 4.2011], "elements": ["#/readResults/0/lines/27/words/0"]}, + {"rowIndex": 6, "columnIndex": 0, "text": "F", "boundingBox": [0.9909, 4.2011, + 3.1582, 4.1948, 3.1582, 4.4079, 0.9909, 4.4079], "elements": ["#/readResults/0/lines/28/words/0"]}, + {"rowIndex": 6, "columnIndex": 1, "text": "6", "boundingBox": [3.1582, 4.1948, + 5.3322, 4.2011, 5.3322, 4.4079, 3.1582, 4.4079], "elements": ["#/readResults/0/lines/29/words/0"]}, + {"rowIndex": 6, "columnIndex": 2, "text": "12.00", "boundingBox": [5.3322, + 4.2011, 7.4928, 4.2011, 7.4928, 4.4141, 5.3322, 4.4079], "elements": ["#/readResults/0/lines/30/words/0"]}, + {"rowIndex": 7, "columnIndex": 0, "text": "G", "boundingBox": [0.9909, 4.4079, + 3.1582, 4.4079, 3.1582, 4.6272, 0.9909, 4.6272], "elements": ["#/readResults/0/lines/31/words/0"]}, + {"rowIndex": 7, "columnIndex": 1, "text": "8", "boundingBox": [3.1582, 4.4079, + 5.3322, 4.4079, 5.3322, 4.6272, 3.1582, 4.6272], "elements": ["#/readResults/0/lines/32/words/0"]}, + {"rowIndex": 7, "columnIndex": 2, "text": "22.00", "boundingBox": [5.3322, + 4.4079, 7.4928, 4.4141, 7.4928, 4.6272, 5.3322, 4.6272], "elements": ["#/readResults/0/lines/33/words/0"]}], + "boundingBox": [0.9959, 2.9319, 7.4973, 2.9322, 7.497, 4.6319, 0.9945, 4.6311]}]}]}}' + headers: + apim-request-id: a8892a59-c197-4e39-8296-964b8f9448dd + content-length: '15907' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 17:48:10 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '20' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/layout/analyzeResults/6ee8063f-696c-4072-8fc3-2939fe0e5471 +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms.test_pages_kwarg_specified.yaml new file mode 100644 index 000000000000..2533fb82df62 --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms.test_pages_kwarg_specified.yaml @@ -0,0 +1,728 @@ +interactions: +- request: + body: 'b''{"source": "container_sas_url", "sourceFilter": {"prefix": "", "includeSubFolders": + false}, "useLabelFile": false}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '295' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models + response: + body: + string: '' + headers: + apim-request-id: + - 1db910b1-592e-49ab-abc4-18b88e3f382c + content-length: + - '0' + date: + - Thu, 11 Mar 2021 18:00:29 GMT + location: + - https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/31a9d856-8511-4b4b-a67a-757786b29156 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '75' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/31a9d856-8511-4b4b-a67a-757786b29156?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "31a9d856-8511-4b4b-a67a-757786b29156", "status": + "creating", "createdDateTime": "2021-03-11T18:00:29Z", "lastUpdatedDateTime": + "2021-03-11T18:00:29Z"}}' + headers: + apim-request-id: + - e40d1b70-5e12-4730-b432-c6c14ceb3a48 + content-length: + - '170' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 18:00:34 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '15' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/31a9d856-8511-4b4b-a67a-757786b29156?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "31a9d856-8511-4b4b-a67a-757786b29156", "status": + "creating", "createdDateTime": "2021-03-11T18:00:29Z", "lastUpdatedDateTime": + "2021-03-11T18:00:29Z"}}' + headers: + apim-request-id: + - cf3d0997-e838-48d8-8b41-691ce22d1d6f + content-length: + - '170' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 18:00:40 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '16' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/31a9d856-8511-4b4b-a67a-757786b29156?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "31a9d856-8511-4b4b-a67a-757786b29156", "status": + "creating", "createdDateTime": "2021-03-11T18:00:29Z", "lastUpdatedDateTime": + "2021-03-11T18:00:29Z"}}' + headers: + apim-request-id: + - d214a8f5-9f7e-4df2-9618-6624a25f8733 + content-length: + - '170' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 18:00:45 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '13' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/31a9d856-8511-4b4b-a67a-757786b29156?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "31a9d856-8511-4b4b-a67a-757786b29156", "status": + "creating", "createdDateTime": "2021-03-11T18:00:29Z", "lastUpdatedDateTime": + "2021-03-11T18:00:29Z"}}' + headers: + apim-request-id: + - 3fd10f7a-d2c2-4820-b9a4-8f9191780f52 + content-length: + - '170' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 18:00:49 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '14' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/31a9d856-8511-4b4b-a67a-757786b29156?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "31a9d856-8511-4b4b-a67a-757786b29156", "status": + "creating", "createdDateTime": "2021-03-11T18:00:29Z", "lastUpdatedDateTime": + "2021-03-11T18:00:29Z"}}' + headers: + apim-request-id: + - 87440201-efe0-4052-be80-dfbdf647a3b8 + content-length: + - '170' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 18:00:55 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '55' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/31a9d856-8511-4b4b-a67a-757786b29156?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "31a9d856-8511-4b4b-a67a-757786b29156", "status": + "creating", "createdDateTime": "2021-03-11T18:00:29Z", "lastUpdatedDateTime": + "2021-03-11T18:00:29Z"}}' + headers: + apim-request-id: + - f46307d9-0f0a-41df-810a-a9b2d0f24107 + content-length: + - '170' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 18:01:00 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '59' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/31a9d856-8511-4b4b-a67a-757786b29156?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "31a9d856-8511-4b4b-a67a-757786b29156", "status": + "creating", "createdDateTime": "2021-03-11T18:00:29Z", "lastUpdatedDateTime": + "2021-03-11T18:00:29Z"}}' + headers: + apim-request-id: + - c442fb8c-b0d1-4074-8f8b-0cc6b253d830 + content-length: + - '170' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 18:01:05 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '15' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/31a9d856-8511-4b4b-a67a-757786b29156?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "31a9d856-8511-4b4b-a67a-757786b29156", "status": + "creating", "createdDateTime": "2021-03-11T18:00:29Z", "lastUpdatedDateTime": + "2021-03-11T18:00:29Z"}}' + headers: + apim-request-id: + - 341ad7f3-1ccf-4b8c-b662-81e46f0e8900 + content-length: + - '170' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 18:01:11 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '29' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/31a9d856-8511-4b4b-a67a-757786b29156?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "31a9d856-8511-4b4b-a67a-757786b29156", "status": + "creating", "createdDateTime": "2021-03-11T18:00:29Z", "lastUpdatedDateTime": + "2021-03-11T18:00:29Z"}}' + headers: + apim-request-id: + - df282622-6e1f-4b36-a5dd-a8265ecb1229 + content-length: + - '170' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 18:01:16 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '13' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/31a9d856-8511-4b4b-a67a-757786b29156?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "31a9d856-8511-4b4b-a67a-757786b29156", "status": + "creating", "createdDateTime": "2021-03-11T18:00:29Z", "lastUpdatedDateTime": + "2021-03-11T18:00:29Z"}}' + headers: + apim-request-id: + - e5cab462-16f1-4b6c-bb8d-1e53df412527 + content-length: + - '170' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 18:01:21 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '31' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/31a9d856-8511-4b4b-a67a-757786b29156?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "31a9d856-8511-4b4b-a67a-757786b29156", "status": + "ready", "createdDateTime": "2021-03-11T18:00:29Z", "lastUpdatedDateTime": + "2021-03-11T18:01:21Z"}, "keys": {"clusters": {"0": ["1 Redmond way Suite", + "Address:", "Charges", "Contoso", "Invoice Date", "Invoice Due Date", "Invoice + For:", "Invoice Number", "VAT ID"], "1": ["Elemento", "Imposta:", "Prezzo", + "Quantit\u00e0", "Suggerimento:", "Totale parziale:", "Totale:"], "2": ["Address:", + "Article", "Bilbo Baggins", "Conseil:", "Invoice For:", "Item", "Price", "Prix", + "Quantity", "Quantit\u00e9", "Redmond, WA", "Signature:", "Sous-total:", "Subtotal:", + "Tax:", "Tip:", "Total:"], "3": ["Dica:", "Imposto:", "Item", "Pre\u00e7o", + "Quantidade", "Subtotal:", "Total:"], "4": ["Art\u00edculo", "Cantidad", "Consejo:", + "Impuesto:", "Precio", "Subtotal:", "Total:"], "5": ["Artikel", "Gesamt:", + "Menge", "Preis", "Steuer:", "Tipp:", "Zwischensumme:"], "6": ["Belasting:", + "Hoeveelheid", "Item", "Prijs", "Subtotaal:", "Tip:", "Totaal:"], "7": ["12 + RESTR:", "15 SEX:", "16 HGT:", "18 EYES:", "3 DOB:", "4alsS:", "4b EXP:", + "4d DLN:", "9 CLASS:", "9a END:", "DUPS:"], "8": ["Total:"], "9": [], "10": + ["Sales Associate:"], "11": [], "12": ["fax:", "mob:", "tel:"], "13": ["09 + / 21 in the amount of:", "650-768-2322 or e-mail to:", "Card Type:", "City:", + "Email Address:", "Mailing Address:", "Name of Cardholder:", "Purpose of Payment:", + "STATE OF CALIFORNIA:", "Signature:", "State:", "Zip Code:", "form. Telephone + #:", "to charge my:"], "14": ["Address:", "Company Name:", "Company Phone:", + "Dated As:", "Details", "Name:", "Phone:", "Purchase Order #:", "Quantity", + "Total", "Unit Price", "Vendor Name:", "Website:"], "15": ["Division", "Quarterly + Sales Update:", "Region", "Sales Team", "Units Shipped (Thousands)", "YOY"], + "16": [], "17": ["Included", "Package", "Price", "Vendor #:", "below, and + attach a check made out to:"], "18": ["Company Name:", "Contact:", "Preferred + Package:", "Special Requests:", "Vendor #:"], "19": ["fax:", "mob:", "tel:"], + "20": ["Sales Associate:"]}}, "trainResult": {"trainingDocuments": [{"documentName": + "Document%1.pdf", "pages": 2, "errors": [], "status": "succeeded"}, {"documentName": + "Form_1.jpg", "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": + "Invoice_1.pdf", "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": + "Invoice_1.tiff", "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": + "Invoice_6.pdf", "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": + "blank.pdf", "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": + "business-card-multipage.pdf", "pages": 2, "errors": [], "status": "succeeded"}, + {"documentName": "businessCard.jpg", "pages": 1, "errors": [], "status": "succeeded"}, + {"documentName": "businessCard.png", "pages": 1, "errors": [], "status": "succeeded"}, + {"documentName": "content_chinese_simplified.pdf", "pages": 1, "errors": [], + "status": "succeeded"}, {"documentName": "content_dutch.pdf", "pages": 1, + "errors": [], "status": "succeeded"}, {"documentName": "content_french.pdf", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "content_german.pdf", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "content_italian.pdf", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "content_portuguese.pdf", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "content_spanish.pdf", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "contoso-allinone.jpg", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "contoso-receipt.png", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "license_2.jpg", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "multi1.pdf", + "pages": 2, "errors": [], "status": "succeeded"}, {"documentName": "multipage_invoice1.pdf", + "pages": 3, "errors": [], "status": "succeeded"}, {"documentName": "multipagelayout.pdf", + "pages": 2, "errors": [], "status": "succeeded"}, {"documentName": "selection_mark_form.pdf", + "pages": 1, "errors": [], "status": "succeeded"}], "errors": []}}' + headers: + apim-request-id: + - 66c334b5-91a3-480b-a462-f4fe213a977f + content-length: + - '3784' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 18:01:26 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '15' + status: + code: 200 + message: OK +- request: + body: '!!! The request body has been omitted from the recording because its size + 479269 is larger than 128KB. !!!' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '479269' + Content-Type: + - image/jpeg + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/31a9d856-8511-4b4b-a67a-757786b29156/analyze?includeTextDetails=false&pages=1 + response: + body: + string: '' + headers: + apim-request-id: + - a6098a66-5f5f-4fdb-8e5f-a8182eb2dc06 + content-length: + - '0' + date: + - Thu, 11 Mar 2021 18:01:26 GMT + operation-location: + - https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/31a9d856-8511-4b4b-a67a-757786b29156/analyzeresults/a919ac92-02a6-4630-9d7e-ebc372ae354b + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '58' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/31a9d856-8511-4b4b-a67a-757786b29156/analyzeresults/a919ac92-02a6-4630-9d7e-ebc372ae354b + response: + body: + string: '{"status": "running", "createdDateTime": "2021-03-11T18:01:26Z", "lastUpdatedDateTime": + "2021-03-11T18:01:27Z", "analyzeResult": null}' + headers: + apim-request-id: + - 22328e93-460a-461b-b9bc-d4ff5507558a + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 18:01:31 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '16' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/31a9d856-8511-4b4b-a67a-757786b29156/analyzeresults/a919ac92-02a6-4630-9d7e-ebc372ae354b + response: + body: + string: '{"status": "running", "createdDateTime": "2021-03-11T18:01:26Z", "lastUpdatedDateTime": + "2021-03-11T18:01:27Z", "analyzeResult": null}' + headers: + apim-request-id: + - 4e3a34c3-6f35-4b23-9227-769d99ea37ea + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 18:01:36 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '18' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/31a9d856-8511-4b4b-a67a-757786b29156/analyzeresults/a919ac92-02a6-4630-9d7e-ebc372ae354b + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-03-11T18:01:26Z", + "lastUpdatedDateTime": "2021-03-11T18:01:37Z", "analyzeResult": {"version": + "2.1.0", "readResults": [{"page": 1, "angle": 0, "width": 1700, "height": + 2200, "unit": "pixel", "lines": [], "selectionMarks": null}], "pageResults": + [{"page": 1, "keyValuePairs": [{"key": {"text": "Company Phone:", "boundingBox": + [163, 352, 361, 352, 361, 378, 163, 378], "elements": null}, "value": {"text": + "555-348-6512", "boundingBox": [365, 351, 525, 351, 525, 378, 365, 378], "elements": + null}, "confidence": 1.0}, {"key": {"text": "Website:", "boundingBox": [167, + 394, 268, 394, 268, 417, 167, 417], "elements": null}, "value": {"text": "www.herolimited.com", + "boundingBox": [273, 393, 524, 393, 524, 418, 273, 418], "elements": null}, + "confidence": 1.0}, {"key": {"text": "Dated As:", "boundingBox": [1025, 421, + 1158, 421, 1158, 448, 1025, 448], "elements": null}, "value": {"text": "12/20/2020", + "boundingBox": [1163, 420, 1310, 420, 1310, 448, 1163, 448], "elements": null}, + "confidence": 1.0}, {"key": {"text": "Purchase Order #:", "boundingBox": [1023, + 461, 1273, 461, 1273, 488, 1023, 488], "elements": null}, "value": {"text": + "948284", "boundingBox": [1278, 461, 1371, 461, 1371, 489, 1278, 489], "elements": + null}, "confidence": 1.0}, {"key": {"text": "Vendor Name:", "boundingBox": + [160, 611, 344, 611, 344, 637, 160, 637], "elements": null}, "value": {"text": + "Hillary Swank", "boundingBox": [349, 609, 520, 609, 520, 639, 349, 639], + "elements": null}, "confidence": 1.0}, {"key": {"text": "Company Name:", "boundingBox": + [160, 648, 371, 648, 371, 677, 160, 677], "elements": null}, "value": {"text": + "Higgly Wiggly Books", "boundingBox": [376, 646, 629, 646, 629, 679, 376, + 679], "elements": null}, "confidence": 1.0}, {"key": {"text": "Address:", + "boundingBox": [161, 685, 268, 685, 268, 711, 161, 711], "elements": null}, + "value": {"text": "938 NE Burner Road Boulder City, CO 92848", "boundingBox": + [274, 685, 561, 685, 561, 751, 274, 751], "elements": null}, "confidence": + 1.0}, {"key": {"text": "Phone:", "boundingBox": [613, 722, 704, 722, 704, + 749, 613, 749], "elements": null}, "value": {"text": "938-294-2949", "boundingBox": + [709, 722, 882, 722, 882, 749, 709, 749], "elements": null}, "confidence": + 1.0}, {"key": {"text": "Name:", "boundingBox": [166, 853, 248, 853, 248, 879, + 166, 879], "elements": null}, "value": {"text": "Bernie Sanders", "boundingBox": + [253, 852, 445, 852, 445, 880, 253, 880], "elements": null}, "confidence": + 1.0}, {"key": {"text": "Company Name:", "boundingBox": [164, 890, 373, 890, + 373, 919, 164, 919], "elements": null}, "value": {"text": "Jupiter Book Supply", + "boundingBox": [379, 889, 629, 889, 629, 919, 379, 919], "elements": null}, + "confidence": 1.0}, {"key": {"text": "Address:", "boundingBox": [166, 926, + 275, 926, 275, 953, 166, 953], "elements": null}, "value": {"text": "383 N + Kinnick Road Seattle, WA 38383", "boundingBox": [280, 926, 516, 926, 516, + 991, 280, 991], "elements": null}, "confidence": 1.0}, {"key": {"text": "Phone:", + "boundingBox": [760, 964, 849, 964, 849, 990, 760, 990], "elements": null}, + "value": {"text": "932-299-0292", "boundingBox": [854, 964, 1028, 964, 1028, + 990, 854, 990], "elements": null}, "confidence": 1.0}], "tables": [{"rows": + 5, "columns": 4, "boundingBox": [170, 1047, 1527, 1047, 1527, 1252, 170, 1252], + "cells": [{"text": "Details", "rowIndex": 0, "columnIndex": 0, "boundingBox": + [447, 1048, 557, 1048, 557, 1078, 447, 1078], "confidence": 0.0, "rowSpan": + 1, "columnSpan": 1, "elements": null, "isHeader": true, "isFooter": false}, + {"text": "Quantity", "rowIndex": 0, "columnIndex": 1, "boundingBox": [886, + 1048, 1033, 1048, 1033, 1084, 886, 1084], "confidence": 0.0, "rowSpan": 1, + "columnSpan": 1, "elements": null, "isHeader": true, "isFooter": false}, {"text": + "Unit Price", "rowIndex": 0, "columnIndex": 2, "boundingBox": [1111, 1047, + 1266, 1047, 1266, 1078, 1111, 1078], "confidence": 0.0, "rowSpan": 1, "columnSpan": + 1, "elements": null, "isHeader": true, "isFooter": false}, {"text": "Total", + "rowIndex": 0, "columnIndex": 3, "boundingBox": [1382, 1047, 1467, 1047, 1467, + 1076, 1382, 1076], "confidence": 0.0, "rowSpan": 1, "columnSpan": 1, "elements": + null, "isHeader": true, "isFooter": false}, {"text": "Bindings", "rowIndex": + 1, "columnIndex": 0, "boundingBox": [172, 1094, 280, 1094, 280, 1122, 172, + 1122], "confidence": 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, + "isHeader": false, "isFooter": false}, {"text": "20", "rowIndex": 1, "columnIndex": + 1, "boundingBox": [860, 1094, 888, 1094, 888, 1119, 860, 1119], "confidence": + 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": + false}, {"text": "1.00", "rowIndex": 1, "columnIndex": 2, "boundingBox": [1240, + 1095, 1291, 1095, 1291, 1118, 1240, 1118], "confidence": 0.0, "rowSpan": 1, + "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": false}, + {"text": "20.00", "rowIndex": 1, "columnIndex": 3, "boundingBox": [1459, 1096, + 1527, 1096, 1527, 1119, 1459, 1119], "confidence": 0.0, "rowSpan": 1, "columnSpan": + 1, "elements": null, "isHeader": false, "isFooter": false}, {"text": "Covers + Small", "rowIndex": 2, "columnIndex": 0, "boundingBox": [170, 1136, 333, 1136, + 333, 1161, 170, 1161], "confidence": 0.0, "rowSpan": 1, "columnSpan": 1, "elements": + null, "isHeader": false, "isFooter": false}, {"text": "20", "rowIndex": 2, + "columnIndex": 1, "boundingBox": [860, 1135, 888, 1135, 888, 1160, 860, 1160], + "confidence": 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": + false, "isFooter": false}, {"text": "1.00", "rowIndex": 2, "columnIndex": + 2, "boundingBox": [1240, 1135, 1291, 1135, 1291, 1160, 1240, 1160], "confidence": + 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": + false}, {"text": "20.00", "rowIndex": 2, "columnIndex": 3, "boundingBox": + [1459, 1135, 1527, 1135, 1527, 1160, 1459, 1160], "confidence": 0.0, "rowSpan": + 1, "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": false}, + {"text": "Feather Bookmark", "rowIndex": 3, "columnIndex": 0, "boundingBox": + [173, 1179, 399, 1179, 399, 1206, 173, 1206], "confidence": 0.0, "rowSpan": + 1, "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": false}, + {"text": "20", "rowIndex": 3, "columnIndex": 1, "boundingBox": [861, 1179, + 889, 1179, 889, 1203, 861, 1203], "confidence": 0.0, "rowSpan": 1, "columnSpan": + 1, "elements": null, "isHeader": false, "isFooter": false}, {"text": "5.00", + "rowIndex": 3, "columnIndex": 2, "boundingBox": [1240, 1179, 1291, 1179, 1291, + 1204, 1240, 1204], "confidence": 0.0, "rowSpan": 1, "columnSpan": 1, "elements": + null, "isHeader": false, "isFooter": false}, {"text": "100.00", "rowIndex": + 3, "columnIndex": 3, "boundingBox": [1443, 1181, 1525, 1181, 1525, 1205, 1443, + 1205], "confidence": 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, + "isHeader": false, "isFooter": false}, {"text": "Copper Swirl Marker", "rowIndex": + 4, "columnIndex": 0, "boundingBox": [170, 1222, 429, 1222, 429, 1252, 170, + 1252], "confidence": 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, + "isHeader": false, "isFooter": false}, {"text": "20", "rowIndex": 4, "columnIndex": + 1, "boundingBox": [861, 1223, 888, 1223, 888, 1247, 861, 1247], "confidence": + 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": + false}, {"text": "5.00", "rowIndex": 4, "columnIndex": 2, "boundingBox": [1240, + 1221, 1292, 1221, 1292, 1247, 1240, 1247], "confidence": 0.0, "rowSpan": 1, + "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": false}, + {"text": "100.00", "rowIndex": 4, "columnIndex": 3, "boundingBox": [1444, + 1224, 1526, 1224, 1526, 1248, 1444, 1248], "confidence": 0.0, "rowSpan": 1, + "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": false}]}], + "clusterId": null}], "documentResults": [], "errors": []}}' + headers: + apim-request-id: + - 732b6ed5-2db6-45c6-bc73-d9d07452901c + content-length: + - '7876' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 18:01:42 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '26' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_async.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_async.test_pages_kwarg_specified.yaml new file mode 100644 index 000000000000..59c0d5edbd10 --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_async.test_pages_kwarg_specified.yaml @@ -0,0 +1,515 @@ +interactions: +- request: + body: 'b''{"source": "container_sas_url", "sourceFilter": {"prefix": "", "includeSubFolders": + false}, "useLabelFile": false}''' + headers: + Accept: + - application/json + Content-Length: + - '295' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models + response: + body: + string: '' + headers: + apim-request-id: d6f27d9c-6721-4e0d-bb79-b1f5f937d003 + content-length: '0' + date: Thu, 11 Mar 2021 17:55:19 GMT + location: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d77f13f4-1be5-42a2-8570-2be7ad7aa31e + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '73' + status: + code: 201 + message: Created + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d77f13f4-1be5-42a2-8570-2be7ad7aa31e?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "d77f13f4-1be5-42a2-8570-2be7ad7aa31e", "status": + "creating", "createdDateTime": "2021-03-11T17:55:19Z", "lastUpdatedDateTime": + "2021-03-11T17:55:19Z"}}' + headers: + apim-request-id: 03c9fcf4-3c2a-47f2-a710-d3b84e7217ca + content-length: '170' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 17:55:24 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '15' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d77f13f4-1be5-42a2-8570-2be7ad7aa31e?includeKeys=true +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d77f13f4-1be5-42a2-8570-2be7ad7aa31e?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "d77f13f4-1be5-42a2-8570-2be7ad7aa31e", "status": + "creating", "createdDateTime": "2021-03-11T17:55:19Z", "lastUpdatedDateTime": + "2021-03-11T17:55:19Z"}}' + headers: + apim-request-id: 99163f2d-fcf1-41a0-99e9-e72ff33276f2 + content-length: '170' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 17:55:29 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '16' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d77f13f4-1be5-42a2-8570-2be7ad7aa31e?includeKeys=true +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d77f13f4-1be5-42a2-8570-2be7ad7aa31e?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "d77f13f4-1be5-42a2-8570-2be7ad7aa31e", "status": + "creating", "createdDateTime": "2021-03-11T17:55:19Z", "lastUpdatedDateTime": + "2021-03-11T17:55:19Z"}}' + headers: + apim-request-id: c2cb09cd-4cdb-4fc9-a795-9c248ddb1761 + content-length: '170' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 17:55:35 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '13' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d77f13f4-1be5-42a2-8570-2be7ad7aa31e?includeKeys=true +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d77f13f4-1be5-42a2-8570-2be7ad7aa31e?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "d77f13f4-1be5-42a2-8570-2be7ad7aa31e", "status": + "creating", "createdDateTime": "2021-03-11T17:55:19Z", "lastUpdatedDateTime": + "2021-03-11T17:55:19Z"}}' + headers: + apim-request-id: d11ea79f-6aea-4a12-bf37-02d3626c40e3 + content-length: '170' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 17:55:39 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '13' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d77f13f4-1be5-42a2-8570-2be7ad7aa31e?includeKeys=true +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d77f13f4-1be5-42a2-8570-2be7ad7aa31e?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "d77f13f4-1be5-42a2-8570-2be7ad7aa31e", "status": + "creating", "createdDateTime": "2021-03-11T17:55:19Z", "lastUpdatedDateTime": + "2021-03-11T17:55:19Z"}}' + headers: + apim-request-id: c0e18cbf-ce46-46ff-9623-ad0a6e77f63e + content-length: '170' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 17:55:45 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '14' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d77f13f4-1be5-42a2-8570-2be7ad7aa31e?includeKeys=true +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d77f13f4-1be5-42a2-8570-2be7ad7aa31e?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "d77f13f4-1be5-42a2-8570-2be7ad7aa31e", "status": + "creating", "createdDateTime": "2021-03-11T17:55:19Z", "lastUpdatedDateTime": + "2021-03-11T17:55:19Z"}}' + headers: + apim-request-id: 332c5851-b112-4232-bb80-393b901bac75 + content-length: '170' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 17:55:50 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '13' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d77f13f4-1be5-42a2-8570-2be7ad7aa31e?includeKeys=true +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d77f13f4-1be5-42a2-8570-2be7ad7aa31e?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "d77f13f4-1be5-42a2-8570-2be7ad7aa31e", "status": + "creating", "createdDateTime": "2021-03-11T17:55:19Z", "lastUpdatedDateTime": + "2021-03-11T17:55:19Z"}}' + headers: + apim-request-id: 960e6738-62ba-4106-8d4c-c228ac6fab8a + content-length: '170' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 17:55:55 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '16' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d77f13f4-1be5-42a2-8570-2be7ad7aa31e?includeKeys=true +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d77f13f4-1be5-42a2-8570-2be7ad7aa31e?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "d77f13f4-1be5-42a2-8570-2be7ad7aa31e", "status": + "creating", "createdDateTime": "2021-03-11T17:55:19Z", "lastUpdatedDateTime": + "2021-03-11T17:55:19Z"}}' + headers: + apim-request-id: b512a2db-4646-4142-a8fd-8564d3cffef8 + content-length: '170' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 17:56:00 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '15' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d77f13f4-1be5-42a2-8570-2be7ad7aa31e?includeKeys=true +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d77f13f4-1be5-42a2-8570-2be7ad7aa31e?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "d77f13f4-1be5-42a2-8570-2be7ad7aa31e", "status": + "creating", "createdDateTime": "2021-03-11T17:55:19Z", "lastUpdatedDateTime": + "2021-03-11T17:55:19Z"}}' + headers: + apim-request-id: 035b564a-f986-4e99-9a36-b084edc22e11 + content-length: '170' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 17:56:05 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '13' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d77f13f4-1be5-42a2-8570-2be7ad7aa31e?includeKeys=true +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d77f13f4-1be5-42a2-8570-2be7ad7aa31e?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "d77f13f4-1be5-42a2-8570-2be7ad7aa31e", "status": + "creating", "createdDateTime": "2021-03-11T17:55:19Z", "lastUpdatedDateTime": + "2021-03-11T17:55:19Z"}}' + headers: + apim-request-id: 08e8eb0d-14ca-402e-85a2-828ea20c4186 + content-length: '170' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 17:56:10 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '12' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d77f13f4-1be5-42a2-8570-2be7ad7aa31e?includeKeys=true +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d77f13f4-1be5-42a2-8570-2be7ad7aa31e?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "d77f13f4-1be5-42a2-8570-2be7ad7aa31e", "status": + "ready", "createdDateTime": "2021-03-11T17:55:19Z", "lastUpdatedDateTime": + "2021-03-11T17:56:15Z"}, "keys": {"clusters": {"0": ["1 Redmond way Suite", + "Address:", "Charges", "Contoso", "Invoice Date", "Invoice Due Date", "Invoice + For:", "Invoice Number", "VAT ID"], "1": ["Elemento", "Imposta:", "Prezzo", + "Quantit\u00e0", "Suggerimento:", "Totale parziale:", "Totale:"], "2": ["Address:", + "Article", "Bilbo Baggins", "Conseil:", "Invoice For:", "Item", "Price", "Prix", + "Quantity", "Quantit\u00e9", "Redmond, WA", "Signature:", "Sous-total:", "Subtotal:", + "Tax:", "Tip:", "Total:"], "3": ["Dica:", "Imposto:", "Item", "Pre\u00e7o", + "Quantidade", "Subtotal:", "Total:"], "4": ["Art\u00edculo", "Cantidad", "Consejo:", + "Impuesto:", "Precio", "Subtotal:", "Total:"], "5": ["Artikel", "Gesamt:", + "Menge", "Preis", "Steuer:", "Tipp:", "Zwischensumme:"], "6": ["Belasting:", + "Hoeveelheid", "Item", "Prijs", "Subtotaal:", "Tip:", "Totaal:"], "7": ["12 + RESTR:", "15 SEX:", "16 HGT:", "18 EYES:", "3 DOB:", "4alsS:", "4b EXP:", + "4d DLN:", "9 CLASS:", "9a END:", "DUPS:"], "8": ["Total:"], "9": [], "10": + ["Sales Associate:"], "11": [], "12": ["fax:", "mob:", "tel:"], "13": ["09 + / 21 in the amount of:", "650-768-2322 or e-mail to:", "Card Type:", "City:", + "Email Address:", "Mailing Address:", "Name of Cardholder:", "Purpose of Payment:", + "STATE OF CALIFORNIA:", "Signature:", "State:", "Zip Code:", "form. Telephone + #:", "to charge my:"], "14": ["Address:", "Company Name:", "Company Phone:", + "Dated As:", "Details", "Name:", "Phone:", "Purchase Order #:", "Quantity", + "Total", "Unit Price", "Vendor Name:", "Website:"], "15": ["Division", "Quarterly + Sales Update:", "Region", "Sales Team", "Units Shipped (Thousands)", "YOY"], + "16": [], "17": ["Included", "Package", "Price", "Vendor #:", "below, and + attach a check made out to:"], "18": ["Company Name:", "Contact:", "Preferred + Package:", "Special Requests:", "Vendor #:"], "19": ["fax:", "mob:", "tel:"], + "20": ["Sales Associate:"]}}, "trainResult": {"trainingDocuments": [{"documentName": + "Document%1.pdf", "pages": 2, "errors": [], "status": "succeeded"}, {"documentName": + "Form_1.jpg", "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": + "Invoice_1.pdf", "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": + "Invoice_1.tiff", "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": + "Invoice_6.pdf", "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": + "blank.pdf", "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": + "business-card-multipage.pdf", "pages": 2, "errors": [], "status": "succeeded"}, + {"documentName": "businessCard.jpg", "pages": 1, "errors": [], "status": "succeeded"}, + {"documentName": "businessCard.png", "pages": 1, "errors": [], "status": "succeeded"}, + {"documentName": "content_chinese_simplified.pdf", "pages": 1, "errors": [], + "status": "succeeded"}, {"documentName": "content_dutch.pdf", "pages": 1, + "errors": [], "status": "succeeded"}, {"documentName": "content_french.pdf", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "content_german.pdf", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "content_italian.pdf", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "content_portuguese.pdf", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "content_spanish.pdf", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "contoso-allinone.jpg", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "contoso-receipt.png", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "license_2.jpg", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "multi1.pdf", + "pages": 2, "errors": [], "status": "succeeded"}, {"documentName": "multipage_invoice1.pdf", + "pages": 3, "errors": [], "status": "succeeded"}, {"documentName": "multipagelayout.pdf", + "pages": 2, "errors": [], "status": "succeeded"}, {"documentName": "selection_mark_form.pdf", + "pages": 1, "errors": [], "status": "succeeded"}], "errors": []}}' + headers: + apim-request-id: 10556300-7f08-4672-8514-747ecbef735b + content-length: '3784' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 17:56:16 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '13' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d77f13f4-1be5-42a2-8570-2be7ad7aa31e?includeKeys=true +- request: + body: '!!! The request body has been omitted from the recording because its size + 479269 is larger than 128KB. !!!' + headers: + Accept: + - application/json + Content-Type: + - image/jpeg + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d77f13f4-1be5-42a2-8570-2be7ad7aa31e/analyze?includeTextDetails=false&pages=1 + response: + body: + string: '' + headers: + apim-request-id: 2d46c05e-3c31-4a78-b4fb-15224850dcc2 + content-length: '0' + date: Thu, 11 Mar 2021 17:56:16 GMT + operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d77f13f4-1be5-42a2-8570-2be7ad7aa31e/analyzeresults/f90c9272-cba9-4743-b976-1c46ba74699c + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '92' + status: + code: 202 + message: Accepted + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d77f13f4-1be5-42a2-8570-2be7ad7aa31e/analyze?includeTextDetails=false&pages=1 +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d77f13f4-1be5-42a2-8570-2be7ad7aa31e/analyzeresults/f90c9272-cba9-4743-b976-1c46ba74699c + response: + body: + string: '{"status": "running", "createdDateTime": "2021-03-11T17:56:16Z", "lastUpdatedDateTime": + "2021-03-11T17:56:17Z", "analyzeResult": null}' + headers: + apim-request-id: add462b2-8714-4f12-b84f-46eec3eb814c + content-length: '134' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 17:56:20 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '27' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d77f13f4-1be5-42a2-8570-2be7ad7aa31e/analyzeresults/f90c9272-cba9-4743-b976-1c46ba74699c +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d77f13f4-1be5-42a2-8570-2be7ad7aa31e/analyzeresults/f90c9272-cba9-4743-b976-1c46ba74699c + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-03-11T17:56:16Z", + "lastUpdatedDateTime": "2021-03-11T17:56:22Z", "analyzeResult": {"version": + "2.1.0", "readResults": [{"page": 1, "angle": 0, "width": 1700, "height": + 2200, "unit": "pixel", "lines": [], "selectionMarks": null}], "pageResults": + [{"page": 1, "keyValuePairs": [{"key": {"text": "Company Phone:", "boundingBox": + [163, 352, 361, 352, 361, 378, 163, 378], "elements": null}, "value": {"text": + "555-348-6512", "boundingBox": [365, 351, 525, 351, 525, 378, 365, 378], "elements": + null}, "confidence": 1.0}, {"key": {"text": "Website:", "boundingBox": [167, + 394, 268, 394, 268, 417, 167, 417], "elements": null}, "value": {"text": "www.herolimited.com", + "boundingBox": [273, 393, 524, 393, 524, 418, 273, 418], "elements": null}, + "confidence": 1.0}, {"key": {"text": "Dated As:", "boundingBox": [1025, 421, + 1158, 421, 1158, 448, 1025, 448], "elements": null}, "value": {"text": "12/20/2020", + "boundingBox": [1163, 420, 1310, 420, 1310, 448, 1163, 448], "elements": null}, + "confidence": 1.0}, {"key": {"text": "Purchase Order #:", "boundingBox": [1023, + 461, 1273, 461, 1273, 488, 1023, 488], "elements": null}, "value": {"text": + "948284", "boundingBox": [1278, 461, 1371, 461, 1371, 489, 1278, 489], "elements": + null}, "confidence": 1.0}, {"key": {"text": "Vendor Name:", "boundingBox": + [160, 611, 344, 611, 344, 637, 160, 637], "elements": null}, "value": {"text": + "Hillary Swank", "boundingBox": [349, 609, 520, 609, 520, 639, 349, 639], + "elements": null}, "confidence": 1.0}, {"key": {"text": "Company Name:", "boundingBox": + [160, 648, 371, 648, 371, 677, 160, 677], "elements": null}, "value": {"text": + "Higgly Wiggly Books", "boundingBox": [376, 646, 629, 646, 629, 679, 376, + 679], "elements": null}, "confidence": 1.0}, {"key": {"text": "Address:", + "boundingBox": [161, 685, 268, 685, 268, 711, 161, 711], "elements": null}, + "value": {"text": "938 NE Burner Road Boulder City, CO 92848", "boundingBox": + [274, 685, 561, 685, 561, 751, 274, 751], "elements": null}, "confidence": + 1.0}, {"key": {"text": "Phone:", "boundingBox": [613, 722, 704, 722, 704, + 749, 613, 749], "elements": null}, "value": {"text": "938-294-2949", "boundingBox": + [709, 722, 882, 722, 882, 749, 709, 749], "elements": null}, "confidence": + 1.0}, {"key": {"text": "Name:", "boundingBox": [166, 853, 248, 853, 248, 879, + 166, 879], "elements": null}, "value": {"text": "Bernie Sanders", "boundingBox": + [253, 852, 445, 852, 445, 880, 253, 880], "elements": null}, "confidence": + 1.0}, {"key": {"text": "Company Name:", "boundingBox": [164, 890, 373, 890, + 373, 919, 164, 919], "elements": null}, "value": {"text": "Jupiter Book Supply", + "boundingBox": [379, 889, 629, 889, 629, 919, 379, 919], "elements": null}, + "confidence": 1.0}, {"key": {"text": "Address:", "boundingBox": [166, 926, + 275, 926, 275, 953, 166, 953], "elements": null}, "value": {"text": "383 N + Kinnick Road Seattle, WA 38383", "boundingBox": [280, 926, 516, 926, 516, + 991, 280, 991], "elements": null}, "confidence": 1.0}, {"key": {"text": "Phone:", + "boundingBox": [760, 964, 849, 964, 849, 990, 760, 990], "elements": null}, + "value": {"text": "932-299-0292", "boundingBox": [854, 964, 1028, 964, 1028, + 990, 854, 990], "elements": null}, "confidence": 1.0}], "tables": [{"rows": + 5, "columns": 4, "boundingBox": [170, 1047, 1527, 1047, 1527, 1252, 170, 1252], + "cells": [{"text": "Details", "rowIndex": 0, "columnIndex": 0, "boundingBox": + [447, 1048, 557, 1048, 557, 1078, 447, 1078], "confidence": 0.0, "rowSpan": + 1, "columnSpan": 1, "elements": null, "isHeader": true, "isFooter": false}, + {"text": "Quantity", "rowIndex": 0, "columnIndex": 1, "boundingBox": [886, + 1048, 1033, 1048, 1033, 1084, 886, 1084], "confidence": 0.0, "rowSpan": 1, + "columnSpan": 1, "elements": null, "isHeader": true, "isFooter": false}, {"text": + "Unit Price", "rowIndex": 0, "columnIndex": 2, "boundingBox": [1111, 1047, + 1266, 1047, 1266, 1078, 1111, 1078], "confidence": 0.0, "rowSpan": 1, "columnSpan": + 1, "elements": null, "isHeader": true, "isFooter": false}, {"text": "Total", + "rowIndex": 0, "columnIndex": 3, "boundingBox": [1382, 1047, 1467, 1047, 1467, + 1076, 1382, 1076], "confidence": 0.0, "rowSpan": 1, "columnSpan": 1, "elements": + null, "isHeader": true, "isFooter": false}, {"text": "Bindings", "rowIndex": + 1, "columnIndex": 0, "boundingBox": [172, 1094, 280, 1094, 280, 1122, 172, + 1122], "confidence": 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, + "isHeader": false, "isFooter": false}, {"text": "20", "rowIndex": 1, "columnIndex": + 1, "boundingBox": [860, 1094, 888, 1094, 888, 1119, 860, 1119], "confidence": + 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": + false}, {"text": "1.00", "rowIndex": 1, "columnIndex": 2, "boundingBox": [1240, + 1095, 1291, 1095, 1291, 1118, 1240, 1118], "confidence": 0.0, "rowSpan": 1, + "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": false}, + {"text": "20.00", "rowIndex": 1, "columnIndex": 3, "boundingBox": [1459, 1096, + 1527, 1096, 1527, 1119, 1459, 1119], "confidence": 0.0, "rowSpan": 1, "columnSpan": + 1, "elements": null, "isHeader": false, "isFooter": false}, {"text": "Covers + Small", "rowIndex": 2, "columnIndex": 0, "boundingBox": [170, 1136, 333, 1136, + 333, 1161, 170, 1161], "confidence": 0.0, "rowSpan": 1, "columnSpan": 1, "elements": + null, "isHeader": false, "isFooter": false}, {"text": "20", "rowIndex": 2, + "columnIndex": 1, "boundingBox": [860, 1135, 888, 1135, 888, 1160, 860, 1160], + "confidence": 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": + false, "isFooter": false}, {"text": "1.00", "rowIndex": 2, "columnIndex": + 2, "boundingBox": [1240, 1135, 1291, 1135, 1291, 1160, 1240, 1160], "confidence": + 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": + false}, {"text": "20.00", "rowIndex": 2, "columnIndex": 3, "boundingBox": + [1459, 1135, 1527, 1135, 1527, 1160, 1459, 1160], "confidence": 0.0, "rowSpan": + 1, "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": false}, + {"text": "Feather Bookmark", "rowIndex": 3, "columnIndex": 0, "boundingBox": + [173, 1179, 399, 1179, 399, 1206, 173, 1206], "confidence": 0.0, "rowSpan": + 1, "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": false}, + {"text": "20", "rowIndex": 3, "columnIndex": 1, "boundingBox": [861, 1179, + 889, 1179, 889, 1203, 861, 1203], "confidence": 0.0, "rowSpan": 1, "columnSpan": + 1, "elements": null, "isHeader": false, "isFooter": false}, {"text": "5.00", + "rowIndex": 3, "columnIndex": 2, "boundingBox": [1240, 1179, 1291, 1179, 1291, + 1204, 1240, 1204], "confidence": 0.0, "rowSpan": 1, "columnSpan": 1, "elements": + null, "isHeader": false, "isFooter": false}, {"text": "100.00", "rowIndex": + 3, "columnIndex": 3, "boundingBox": [1443, 1181, 1525, 1181, 1525, 1205, 1443, + 1205], "confidence": 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, + "isHeader": false, "isFooter": false}, {"text": "Copper Swirl Marker", "rowIndex": + 4, "columnIndex": 0, "boundingBox": [170, 1222, 429, 1222, 429, 1252, 170, + 1252], "confidence": 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, + "isHeader": false, "isFooter": false}, {"text": "20", "rowIndex": 4, "columnIndex": + 1, "boundingBox": [861, 1223, 888, 1223, 888, 1247, 861, 1247], "confidence": + 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": + false}, {"text": "5.00", "rowIndex": 4, "columnIndex": 2, "boundingBox": [1240, + 1221, 1292, 1221, 1292, 1247, 1240, 1247], "confidence": 0.0, "rowSpan": 1, + "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": false}, + {"text": "100.00", "rowIndex": 4, "columnIndex": 3, "boundingBox": [1444, + 1224, 1526, 1224, 1526, 1248, 1444, 1248], "confidence": 0.0, "rowSpan": 1, + "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": false}]}], + "clusterId": null}], "documentResults": [], "errors": []}}' + headers: + apim-request-id: 569cfb9f-1d0a-4cab-9364-cd17bbb7cd9d + content-length: '7876' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 17:56:26 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '53' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/d77f13f4-1be5-42a2-8570-2be7ad7aa31e/analyzeresults/f90c9272-cba9-4743-b976-1c46ba74699c +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url.test_pages_kwarg_specified.yaml new file mode 100644 index 000000000000..fb7bf7027bf7 --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url.test_pages_kwarg_specified.yaml @@ -0,0 +1,700 @@ +interactions: +- request: + body: 'b''{"source": "container_sas_url", "sourceFilter": {"prefix": "", "includeSubFolders": + false}, "useLabelFile": false}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '295' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models + response: + body: + string: '' + headers: + apim-request-id: + - f34c8c3b-b891-417c-ab28-7482fb8b3111 + content-length: + - '0' + date: + - Thu, 11 Mar 2021 17:58:47 GMT + location: + - https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/fbf74e5a-7922-4045-9b66-0dea938bee97 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '80' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/fbf74e5a-7922-4045-9b66-0dea938bee97?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "fbf74e5a-7922-4045-9b66-0dea938bee97", "status": + "creating", "createdDateTime": "2021-03-11T17:58:48Z", "lastUpdatedDateTime": + "2021-03-11T17:58:48Z"}}' + headers: + apim-request-id: + - 82441d1a-2ce5-4ffb-a6bd-68daf14a6c6f + content-length: + - '170' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 17:58:53 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '28' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/fbf74e5a-7922-4045-9b66-0dea938bee97?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "fbf74e5a-7922-4045-9b66-0dea938bee97", "status": + "creating", "createdDateTime": "2021-03-11T17:58:48Z", "lastUpdatedDateTime": + "2021-03-11T17:58:48Z"}}' + headers: + apim-request-id: + - 19df9b53-94a9-42d2-a7b4-2bb9155886c8 + content-length: + - '170' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 17:58:57 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '13' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/fbf74e5a-7922-4045-9b66-0dea938bee97?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "fbf74e5a-7922-4045-9b66-0dea938bee97", "status": + "creating", "createdDateTime": "2021-03-11T17:58:48Z", "lastUpdatedDateTime": + "2021-03-11T17:58:48Z"}}' + headers: + apim-request-id: + - 701729b0-10e1-4a7a-bc39-7c9123936eac + content-length: + - '170' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 17:59:03 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '56' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/fbf74e5a-7922-4045-9b66-0dea938bee97?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "fbf74e5a-7922-4045-9b66-0dea938bee97", "status": + "creating", "createdDateTime": "2021-03-11T17:58:48Z", "lastUpdatedDateTime": + "2021-03-11T17:58:48Z"}}' + headers: + apim-request-id: + - cc57ad3d-b168-4d09-906d-8aef2acaea4d + content-length: + - '170' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 17:59:07 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '23' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/fbf74e5a-7922-4045-9b66-0dea938bee97?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "fbf74e5a-7922-4045-9b66-0dea938bee97", "status": + "creating", "createdDateTime": "2021-03-11T17:58:48Z", "lastUpdatedDateTime": + "2021-03-11T17:58:48Z"}}' + headers: + apim-request-id: + - b1b98ce3-0652-48cd-a300-d9ea6b6758d9 + content-length: + - '170' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 17:59:13 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '59' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/fbf74e5a-7922-4045-9b66-0dea938bee97?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "fbf74e5a-7922-4045-9b66-0dea938bee97", "status": + "creating", "createdDateTime": "2021-03-11T17:58:48Z", "lastUpdatedDateTime": + "2021-03-11T17:58:48Z"}}' + headers: + apim-request-id: + - af1865fd-2bce-4016-bc18-00db718f55aa + content-length: + - '170' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 17:59:18 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '14' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/fbf74e5a-7922-4045-9b66-0dea938bee97?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "fbf74e5a-7922-4045-9b66-0dea938bee97", "status": + "creating", "createdDateTime": "2021-03-11T17:58:48Z", "lastUpdatedDateTime": + "2021-03-11T17:58:48Z"}}' + headers: + apim-request-id: + - 39a68594-8f67-434b-b415-b5b82ba2304c + content-length: + - '170' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 17:59:23 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '14' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/fbf74e5a-7922-4045-9b66-0dea938bee97?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "fbf74e5a-7922-4045-9b66-0dea938bee97", "status": + "creating", "createdDateTime": "2021-03-11T17:58:48Z", "lastUpdatedDateTime": + "2021-03-11T17:58:48Z"}}' + headers: + apim-request-id: + - e11c7f51-4464-4161-ab38-e716a4609f06 + content-length: + - '170' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 17:59:28 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '16' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/fbf74e5a-7922-4045-9b66-0dea938bee97?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "fbf74e5a-7922-4045-9b66-0dea938bee97", "status": + "creating", "createdDateTime": "2021-03-11T17:58:48Z", "lastUpdatedDateTime": + "2021-03-11T17:58:48Z"}}' + headers: + apim-request-id: + - 00d99c55-9af6-431d-a0a9-61a376926321 + content-length: + - '170' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 17:59:33 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '15' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/fbf74e5a-7922-4045-9b66-0dea938bee97?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "fbf74e5a-7922-4045-9b66-0dea938bee97", "status": + "creating", "createdDateTime": "2021-03-11T17:58:48Z", "lastUpdatedDateTime": + "2021-03-11T17:58:48Z"}}' + headers: + apim-request-id: + - 1f897f2b-d282-44e4-9ec7-17991d0cd1f3 + content-length: + - '170' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 17:59:39 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '15' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/fbf74e5a-7922-4045-9b66-0dea938bee97?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "fbf74e5a-7922-4045-9b66-0dea938bee97", "status": + "ready", "createdDateTime": "2021-03-11T17:58:48Z", "lastUpdatedDateTime": + "2021-03-11T17:59:42Z"}, "keys": {"clusters": {"0": ["1 Redmond way Suite", + "Address:", "Charges", "Contoso", "Invoice Date", "Invoice Due Date", "Invoice + For:", "Invoice Number", "VAT ID"], "1": ["Elemento", "Imposta:", "Prezzo", + "Quantit\u00e0", "Suggerimento:", "Totale parziale:", "Totale:"], "2": ["Address:", + "Article", "Bilbo Baggins", "Conseil:", "Invoice For:", "Item", "Price", "Prix", + "Quantity", "Quantit\u00e9", "Redmond, WA", "Signature:", "Sous-total:", "Subtotal:", + "Tax:", "Tip:", "Total:"], "3": ["Dica:", "Imposto:", "Item", "Pre\u00e7o", + "Quantidade", "Subtotal:", "Total:"], "4": ["Art\u00edculo", "Cantidad", "Consejo:", + "Impuesto:", "Precio", "Subtotal:", "Total:"], "5": ["Artikel", "Gesamt:", + "Menge", "Preis", "Steuer:", "Tipp:", "Zwischensumme:"], "6": ["Belasting:", + "Hoeveelheid", "Item", "Prijs", "Subtotaal:", "Tip:", "Totaal:"], "7": ["12 + RESTR:", "15 SEX:", "16 HGT:", "18 EYES:", "3 DOB:", "4alsS:", "4b EXP:", + "4d DLN:", "9 CLASS:", "9a END:", "DUPS:"], "8": ["Total:"], "9": [], "10": + ["Sales Associate:"], "11": [], "12": ["fax:", "mob:", "tel:"], "13": ["09 + / 21 in the amount of:", "650-768-2322 or e-mail to:", "Card Type:", "City:", + "Email Address:", "Mailing Address:", "Name of Cardholder:", "Purpose of Payment:", + "STATE OF CALIFORNIA:", "Signature:", "State:", "Zip Code:", "form. Telephone + #:", "to charge my:"], "14": ["Address:", "Company Name:", "Company Phone:", + "Dated As:", "Details", "Name:", "Phone:", "Purchase Order #:", "Quantity", + "Total", "Unit Price", "Vendor Name:", "Website:"], "15": ["Division", "Quarterly + Sales Update:", "Region", "Sales Team", "Units Shipped (Thousands)", "YOY"], + "16": [], "17": ["Included", "Package", "Price", "Vendor #:", "below, and + attach a check made out to:"], "18": ["Company Name:", "Contact:", "Preferred + Package:", "Special Requests:", "Vendor #:"], "19": ["fax:", "mob:", "tel:"], + "20": ["Sales Associate:"]}}, "trainResult": {"trainingDocuments": [{"documentName": + "Document%1.pdf", "pages": 2, "errors": [], "status": "succeeded"}, {"documentName": + "Form_1.jpg", "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": + "Invoice_1.pdf", "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": + "Invoice_1.tiff", "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": + "Invoice_6.pdf", "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": + "blank.pdf", "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": + "business-card-multipage.pdf", "pages": 2, "errors": [], "status": "succeeded"}, + {"documentName": "businessCard.jpg", "pages": 1, "errors": [], "status": "succeeded"}, + {"documentName": "businessCard.png", "pages": 1, "errors": [], "status": "succeeded"}, + {"documentName": "content_chinese_simplified.pdf", "pages": 1, "errors": [], + "status": "succeeded"}, {"documentName": "content_dutch.pdf", "pages": 1, + "errors": [], "status": "succeeded"}, {"documentName": "content_french.pdf", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "content_german.pdf", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "content_italian.pdf", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "content_portuguese.pdf", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "content_spanish.pdf", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "contoso-allinone.jpg", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "contoso-receipt.png", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "license_2.jpg", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "multi1.pdf", + "pages": 2, "errors": [], "status": "succeeded"}, {"documentName": "multipage_invoice1.pdf", + "pages": 3, "errors": [], "status": "succeeded"}, {"documentName": "multipagelayout.pdf", + "pages": 2, "errors": [], "status": "succeeded"}, {"documentName": "selection_mark_form.pdf", + "pages": 1, "errors": [], "status": "succeeded"}], "errors": []}}' + headers: + apim-request-id: + - e35d997b-30af-49fc-9e03-3414ef25ee37 + content-length: + - '3784' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 17:59:43 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '20' + status: + code: 200 + message: OK +- request: + body: 'b''{"source": "blob_sas_url"}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '223' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/fbf74e5a-7922-4045-9b66-0dea938bee97/analyze?includeTextDetails=false&pages=1 + response: + body: + string: '' + headers: + apim-request-id: + - feaa633f-4392-401c-b1fa-6a7571505897 + content-length: + - '0' + date: + - Thu, 11 Mar 2021 17:59:43 GMT + operation-location: + - https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/fbf74e5a-7922-4045-9b66-0dea938bee97/analyzeresults/450d6b7b-884f-4412-a14f-4ef769bd31c4 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '53' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/fbf74e5a-7922-4045-9b66-0dea938bee97/analyzeresults/450d6b7b-884f-4412-a14f-4ef769bd31c4 + response: + body: + string: '{"status": "running", "createdDateTime": "2021-03-11T17:59:44Z", "lastUpdatedDateTime": + "2021-03-11T17:59:46Z", "analyzeResult": null}' + headers: + apim-request-id: + - 98b90740-028f-4981-a726-7e892c79f897 + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 17:59:49 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '18' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/fbf74e5a-7922-4045-9b66-0dea938bee97/analyzeresults/450d6b7b-884f-4412-a14f-4ef769bd31c4 + response: + body: + string: '{"status": "running", "createdDateTime": "2021-03-11T17:59:44Z", "lastUpdatedDateTime": + "2021-03-11T17:59:46Z", "analyzeResult": null}' + headers: + apim-request-id: + - ac5e4f96-8c35-45d3-b5af-0b7e5ac1ac84 + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 17:59:54 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '16' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/fbf74e5a-7922-4045-9b66-0dea938bee97/analyzeresults/450d6b7b-884f-4412-a14f-4ef769bd31c4 + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-03-11T17:59:44Z", + "lastUpdatedDateTime": "2021-03-11T17:59:57Z", "analyzeResult": {"version": + "2.1.0", "readResults": [{"page": 1, "angle": 0, "width": 8.5, "height": 11.0, + "unit": "inch", "lines": [], "selectionMarks": null}], "pageResults": [{"page": + 1, "keyValuePairs": [{"key": {"text": "Vendor #:", "boundingBox": [6.1278, + 1.0652, 7.1264, 1.0652, 7.1264, 1.2612, 6.1278, 1.2612], "elements": null}, + "value": {"text": "121", "boundingBox": [7.1264, 1.0625, 7.4792, 1.0625, 7.4792, + 1.2639, 7.1264, 1.2639], "elements": null}, "confidence": 1.0}, {"key": {"text": + "below, and attach a check made out to:", "boundingBox": [0.9889, 3.2278, + 3.6778, 3.2278, 3.6778, 3.3958, 0.9889, 3.3958], "elements": null}, "value": + {"text": "Contoso Ltd. 2345 Dogwood Lane Birch, Kansas 98123", "boundingBox": + [0.9931, 3.5729, 2.375, 3.5729, 2.375, 4.1541, 0.9931, 4.1541], "elements": + null}, "confidence": 1.0}], "tables": [{"rows": 6, "columns": 3, "boundingBox": + [1.0694, 4.6806, 6.2917, 4.6806, 6.2917, 8.875, 1.0694, 8.875], "cells": [{"text": + "Package", "rowIndex": 0, "columnIndex": 0, "boundingBox": [1.0722, 4.6944, + 1.6278, 4.6944, 1.6278, 4.8438, 1.0722, 4.8438], "confidence": 0.0, "rowSpan": + 1, "columnSpan": 1, "elements": null, "isHeader": true, "isFooter": false}, + {"text": "Included", "rowIndex": 0, "columnIndex": 1, "boundingBox": [2.6944, + 4.6806, 3.2708, 4.6806, 3.2708, 4.8438, 2.6944, 4.8438], "confidence": 0.0, + "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": true, "isFooter": + false}, {"text": "Price", "rowIndex": 0, "columnIndex": 2, "boundingBox": + [5.8222, 4.691, 6.1417, 4.691, 6.1417, 4.816, 5.8222, 4.816], "confidence": + 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": true, "isFooter": + false}, {"text": "Gold Sponsor", "rowIndex": 1, "columnIndex": 0, "boundingBox": + [1.0764, 4.9048, 1.9861, 4.9048, 1.9861, 5.0527, 1.0764, 5.0527], "confidence": + 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": + false}, {"text": "Full booth Pre-keynote thank you Logo on poster Full page + ad in program guide", "rowIndex": 1, "columnIndex": 1, "boundingBox": [3.1694, + 4.9115, 5.2111, 4.9115, 5.2111, 5.7158, 3.1694, 5.7158], "confidence": 0.0, + "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": + false}, {"text": "$1,500", "rowIndex": 1, "columnIndex": 2, "boundingBox": + [5.8194, 4.8993, 6.2806, 4.8993, 6.2806, 5.0556, 5.8194, 5.0556], "confidence": + 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": + false}, {"text": "Silver Sponsor", "rowIndex": 2, "columnIndex": 0, "boundingBox": + [1.0722, 5.9792, 2.0444, 5.9792, 2.0444, 6.125, 1.0722, 6.125], "confidence": + 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": + false}, {"text": "Full booth Post-keynote thank you Logo on poster Half page + ad in program guide", "rowIndex": 2, "columnIndex": 1, "boundingBox": [3.1736, + 5.9809, 5.2333, 5.9809, 5.2333, 6.7778, 3.1736, 6.7778], "confidence": 0.0, + "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": + false}, {"text": "$1,200", "rowIndex": 2, "columnIndex": 2, "boundingBox": + [5.8222, 5.9549, 6.2847, 5.9549, 6.2847, 6.125, 5.8222, 6.125], "confidence": + 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": + false}, {"text": "Bronze Sponsor", "rowIndex": 3, "columnIndex": 0, "boundingBox": + [1.0764, 6.8352, 2.1458, 6.8352, 2.1458, 6.9794, 1.0764, 6.9794], "confidence": + 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": + false}, {"text": "Full booth Logo on poster 50% discount on program guide + advertisements", "rowIndex": 3, "columnIndex": 1, "boundingBox": [3.1806, + 6.8385, 5.3333, 6.8385, 5.3333, 7.6042, 3.1806, 7.6042], "confidence": 0.0, + "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": + false}, {"text": "$1,000", "rowIndex": 3, "columnIndex": 2, "boundingBox": + [5.8167, 6.816, 6.2917, 6.816, 6.2917, 6.9861, 5.8167, 6.9861], "confidence": + 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": + false}, {"text": "Full Booth", "rowIndex": 4, "columnIndex": 0, "boundingBox": + [1.0806, 7.6736, 1.75, 7.6736, 1.75, 7.8125, 1.0806, 7.8125], "confidence": + 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": + false}, {"text": "Full booth 50% discount on program guide advertisements", + "rowIndex": 4, "columnIndex": 1, "boundingBox": [3.1806, 7.684, 5.3403, 7.684, + 5.3403, 8.2396, 3.1806, 8.2396], "confidence": 0.0, "rowSpan": 1, "columnSpan": + 1, "elements": null, "isHeader": false, "isFooter": false}, {"text": "$600", + "rowIndex": 4, "columnIndex": 2, "boundingBox": [5.8167, 7.6701, 6.1458, 7.6701, + 6.1458, 7.8194, 5.8167, 7.8194], "confidence": 0.0, "rowSpan": 1, "columnSpan": + 1, "elements": null, "isHeader": false, "isFooter": false}, {"text": "Half + Booth", "rowIndex": 5, "columnIndex": 0, "boundingBox": [1.0694, 8.3125, 1.775, + 8.3125, 1.775, 8.4463, 1.0694, 8.4463], "confidence": 0.0, "rowSpan": 1, "columnSpan": + 1, "elements": null, "isHeader": false, "isFooter": false}, {"text": "Full + booth 25% discount on program guide advertisements", "rowIndex": 5, "columnIndex": + 1, "boundingBox": [3.1806, 8.3194, 5.3361, 8.3194, 5.3361, 8.875, 3.1806, + 8.875], "confidence": 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, + "isHeader": false, "isFooter": false}, {"text": "$350", "rowIndex": 5, "columnIndex": + 2, "boundingBox": [5.8222, 8.3021, 6.1528, 8.3021, 6.1528, 8.4479, 5.8222, + 8.4479], "confidence": 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, + "isHeader": false, "isFooter": false}]}], "clusterId": null}], "documentResults": + [], "errors": []}}' + headers: + apim-request-id: + - 14641a68-f268-4b8e-b63c-3db0a6f4fdc6 + content-length: + - '5765' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 17:59:59 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '20' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url_async.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url_async.test_pages_kwarg_specified.yaml new file mode 100644 index 000000000000..cc6f8e10bd8d --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_from_url_async.test_pages_kwarg_specified.yaml @@ -0,0 +1,512 @@ +interactions: +- request: + body: 'b''{"source": "container_sas_url", "sourceFilter": {"prefix": "", "includeSubFolders": + false}, "useLabelFile": false}''' + headers: + Accept: + - application/json + Content-Length: + - '295' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models + response: + body: + string: '' + headers: + apim-request-id: 1259c7f1-350b-4753-9adc-7982b2668f2b + content-length: '0' + date: Thu, 11 Mar 2021 17:57:03 GMT + location: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040 + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '100' + status: + code: 201 + message: Created + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "39fb8ad8-9e3c-4695-b6fe-17c208381040", "status": + "creating", "createdDateTime": "2021-03-11T17:57:03Z", "lastUpdatedDateTime": + "2021-03-11T17:57:03Z"}}' + headers: + apim-request-id: 95c69ac6-75ad-44b1-b47b-62779499f637 + content-length: '170' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 17:57:08 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '15' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040?includeKeys=true +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "39fb8ad8-9e3c-4695-b6fe-17c208381040", "status": + "creating", "createdDateTime": "2021-03-11T17:57:03Z", "lastUpdatedDateTime": + "2021-03-11T17:57:03Z"}}' + headers: + apim-request-id: 8d80e3dd-261e-438e-a7ce-5bbbd58fa50f + content-length: '170' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 17:57:13 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '14' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040?includeKeys=true +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "39fb8ad8-9e3c-4695-b6fe-17c208381040", "status": + "creating", "createdDateTime": "2021-03-11T17:57:03Z", "lastUpdatedDateTime": + "2021-03-11T17:57:03Z"}}' + headers: + apim-request-id: 31238480-28e5-4af1-9d41-5bc1112d8cb6 + content-length: '170' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 17:57:19 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '14' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040?includeKeys=true +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "39fb8ad8-9e3c-4695-b6fe-17c208381040", "status": + "creating", "createdDateTime": "2021-03-11T17:57:03Z", "lastUpdatedDateTime": + "2021-03-11T17:57:03Z"}}' + headers: + apim-request-id: c84d14f8-68b6-4b66-962f-8bd259c40f66 + content-length: '170' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 17:57:24 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '14' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040?includeKeys=true +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "39fb8ad8-9e3c-4695-b6fe-17c208381040", "status": + "creating", "createdDateTime": "2021-03-11T17:57:03Z", "lastUpdatedDateTime": + "2021-03-11T17:57:03Z"}}' + headers: + apim-request-id: 940fae18-dfca-494e-af9c-9c0b68cca473 + content-length: '170' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 17:57:28 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '14' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040?includeKeys=true +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "39fb8ad8-9e3c-4695-b6fe-17c208381040", "status": + "creating", "createdDateTime": "2021-03-11T17:57:03Z", "lastUpdatedDateTime": + "2021-03-11T17:57:03Z"}}' + headers: + apim-request-id: d26181e8-a1ab-4d47-9a6b-f93180161e33 + content-length: '170' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 17:57:34 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '13' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040?includeKeys=true +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "39fb8ad8-9e3c-4695-b6fe-17c208381040", "status": + "creating", "createdDateTime": "2021-03-11T17:57:03Z", "lastUpdatedDateTime": + "2021-03-11T17:57:03Z"}}' + headers: + apim-request-id: ebb42351-41c1-49f6-8098-1951fc5ee6f8 + content-length: '170' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 17:57:38 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '16' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040?includeKeys=true +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "39fb8ad8-9e3c-4695-b6fe-17c208381040", "status": + "creating", "createdDateTime": "2021-03-11T17:57:03Z", "lastUpdatedDateTime": + "2021-03-11T17:57:03Z"}}' + headers: + apim-request-id: b1e8ca37-471c-4f5c-b864-026b5fc6259b + content-length: '170' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 17:57:44 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '16' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040?includeKeys=true +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "39fb8ad8-9e3c-4695-b6fe-17c208381040", "status": + "creating", "createdDateTime": "2021-03-11T17:57:03Z", "lastUpdatedDateTime": + "2021-03-11T17:57:03Z"}}' + headers: + apim-request-id: 466209b5-7d64-4fc5-bf5d-62e0a63154bc + content-length: '170' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 17:57:49 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '13' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040?includeKeys=true +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "39fb8ad8-9e3c-4695-b6fe-17c208381040", "status": + "creating", "createdDateTime": "2021-03-11T17:57:03Z", "lastUpdatedDateTime": + "2021-03-11T17:57:03Z"}}' + headers: + apim-request-id: 229d8f5a-eab5-48a4-89c7-f78c358cf321 + content-length: '170' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 17:57:54 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '15' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040?includeKeys=true +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040?includeKeys=true + response: + body: + string: '{"modelInfo": {"modelId": "39fb8ad8-9e3c-4695-b6fe-17c208381040", "status": + "ready", "createdDateTime": "2021-03-11T17:57:03Z", "lastUpdatedDateTime": + "2021-03-11T17:57:54Z"}, "keys": {"clusters": {"0": ["1 Redmond way Suite", + "Address:", "Charges", "Contoso", "Invoice Date", "Invoice Due Date", "Invoice + For:", "Invoice Number", "VAT ID"], "1": ["Elemento", "Imposta:", "Prezzo", + "Quantit\u00e0", "Suggerimento:", "Totale parziale:", "Totale:"], "2": ["Address:", + "Article", "Bilbo Baggins", "Conseil:", "Invoice For:", "Item", "Price", "Prix", + "Quantity", "Quantit\u00e9", "Redmond, WA", "Signature:", "Sous-total:", "Subtotal:", + "Tax:", "Tip:", "Total:"], "3": ["Dica:", "Imposto:", "Item", "Pre\u00e7o", + "Quantidade", "Subtotal:", "Total:"], "4": ["Art\u00edculo", "Cantidad", "Consejo:", + "Impuesto:", "Precio", "Subtotal:", "Total:"], "5": ["Artikel", "Gesamt:", + "Menge", "Preis", "Steuer:", "Tipp:", "Zwischensumme:"], "6": ["Belasting:", + "Hoeveelheid", "Item", "Prijs", "Subtotaal:", "Tip:", "Totaal:"], "7": ["12 + RESTR:", "15 SEX:", "16 HGT:", "18 EYES:", "3 DOB:", "4alsS:", "4b EXP:", + "4d DLN:", "9 CLASS:", "9a END:", "DUPS:"], "8": ["Total:"], "9": [], "10": + ["Sales Associate:"], "11": [], "12": ["fax:", "mob:", "tel:"], "13": ["09 + / 21 in the amount of:", "650-768-2322 or e-mail to:", "Card Type:", "City:", + "Email Address:", "Mailing Address:", "Name of Cardholder:", "Purpose of Payment:", + "STATE OF CALIFORNIA:", "Signature:", "State:", "Zip Code:", "form. Telephone + #:", "to charge my:"], "14": ["Address:", "Company Name:", "Company Phone:", + "Dated As:", "Details", "Name:", "Phone:", "Purchase Order #:", "Quantity", + "Total", "Unit Price", "Vendor Name:", "Website:"], "15": ["Division", "Quarterly + Sales Update:", "Region", "Sales Team", "Units Shipped (Thousands)", "YOY"], + "16": [], "17": ["Included", "Package", "Price", "Vendor #:", "below, and + attach a check made out to:"], "18": ["Company Name:", "Contact:", "Preferred + Package:", "Special Requests:", "Vendor #:"], "19": ["fax:", "mob:", "tel:"], + "20": ["Sales Associate:"]}}, "trainResult": {"trainingDocuments": [{"documentName": + "Document%1.pdf", "pages": 2, "errors": [], "status": "succeeded"}, {"documentName": + "Form_1.jpg", "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": + "Invoice_1.pdf", "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": + "Invoice_1.tiff", "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": + "Invoice_6.pdf", "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": + "blank.pdf", "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": + "business-card-multipage.pdf", "pages": 2, "errors": [], "status": "succeeded"}, + {"documentName": "businessCard.jpg", "pages": 1, "errors": [], "status": "succeeded"}, + {"documentName": "businessCard.png", "pages": 1, "errors": [], "status": "succeeded"}, + {"documentName": "content_chinese_simplified.pdf", "pages": 1, "errors": [], + "status": "succeeded"}, {"documentName": "content_dutch.pdf", "pages": 1, + "errors": [], "status": "succeeded"}, {"documentName": "content_french.pdf", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "content_german.pdf", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "content_italian.pdf", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "content_portuguese.pdf", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "content_spanish.pdf", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "contoso-allinone.jpg", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "contoso-receipt.png", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "license_2.jpg", + "pages": 1, "errors": [], "status": "succeeded"}, {"documentName": "multi1.pdf", + "pages": 2, "errors": [], "status": "succeeded"}, {"documentName": "multipage_invoice1.pdf", + "pages": 3, "errors": [], "status": "succeeded"}, {"documentName": "multipagelayout.pdf", + "pages": 2, "errors": [], "status": "succeeded"}, {"documentName": "selection_mark_form.pdf", + "pages": 1, "errors": [], "status": "succeeded"}], "errors": []}}' + headers: + apim-request-id: 013dade0-9f12-4bf6-ae93-0a73c62239af + content-length: '3784' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 17:58:00 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '16' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040?includeKeys=true +- request: + body: 'b''{"source": "blob_sas_url"}''' + headers: + Accept: + - application/json + Content-Length: + - '223' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040/analyze?includeTextDetails=false&pages=1 + response: + body: + string: '' + headers: + apim-request-id: 4defffa6-2d9b-4a4d-a29d-d1cce5c726f2 + content-length: '0' + date: Thu, 11 Mar 2021 17:58:00 GMT + operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040/analyzeresults/8df403cc-038e-4b07-880b-45b7efaff893 + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '94' + status: + code: 202 + message: Accepted + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040/analyze?includeTextDetails=false&pages=1 +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040/analyzeresults/8df403cc-038e-4b07-880b-45b7efaff893 + response: + body: + string: '{"status": "running", "createdDateTime": "2021-03-11T17:58:00Z", "lastUpdatedDateTime": + "2021-03-11T17:58:01Z", "analyzeResult": null}' + headers: + apim-request-id: 95321f03-63ea-4ceb-ba7e-3c940f945961 + content-length: '134' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 17:58:04 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '17' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040/analyzeresults/8df403cc-038e-4b07-880b-45b7efaff893 +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040/analyzeresults/8df403cc-038e-4b07-880b-45b7efaff893 + response: + body: + string: '{"status": "running", "createdDateTime": "2021-03-11T17:58:00Z", "lastUpdatedDateTime": + "2021-03-11T17:58:01Z", "analyzeResult": null}' + headers: + apim-request-id: 1cd9ec7d-a28b-4701-b7bc-e75cbbd507f2 + content-length: '134' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 17:58:09 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '18' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040/analyzeresults/8df403cc-038e-4b07-880b-45b7efaff893 +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040/analyzeresults/8df403cc-038e-4b07-880b-45b7efaff893 + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-03-11T17:58:00Z", + "lastUpdatedDateTime": "2021-03-11T17:58:13Z", "analyzeResult": {"version": + "2.1.0", "readResults": [{"page": 1, "angle": 0, "width": 8.5, "height": 11.0, + "unit": "inch", "lines": [], "selectionMarks": null}], "pageResults": [{"page": + 1, "keyValuePairs": [{"key": {"text": "Vendor #:", "boundingBox": [6.1278, + 1.0652, 7.1264, 1.0652, 7.1264, 1.2612, 6.1278, 1.2612], "elements": null}, + "value": {"text": "121", "boundingBox": [7.1264, 1.0625, 7.4792, 1.0625, 7.4792, + 1.2639, 7.1264, 1.2639], "elements": null}, "confidence": 1.0}, {"key": {"text": + "below, and attach a check made out to:", "boundingBox": [0.9889, 3.2278, + 3.6778, 3.2278, 3.6778, 3.3958, 0.9889, 3.3958], "elements": null}, "value": + {"text": "Contoso Ltd. 2345 Dogwood Lane Birch, Kansas 98123", "boundingBox": + [0.9931, 3.5729, 2.375, 3.5729, 2.375, 4.1541, 0.9931, 4.1541], "elements": + null}, "confidence": 1.0}], "tables": [{"rows": 6, "columns": 3, "boundingBox": + [1.0694, 4.6806, 6.2917, 4.6806, 6.2917, 8.875, 1.0694, 8.875], "cells": [{"text": + "Package", "rowIndex": 0, "columnIndex": 0, "boundingBox": [1.0722, 4.6944, + 1.6278, 4.6944, 1.6278, 4.8438, 1.0722, 4.8438], "confidence": 0.0, "rowSpan": + 1, "columnSpan": 1, "elements": null, "isHeader": true, "isFooter": false}, + {"text": "Included", "rowIndex": 0, "columnIndex": 1, "boundingBox": [2.6944, + 4.6806, 3.2708, 4.6806, 3.2708, 4.8438, 2.6944, 4.8438], "confidence": 0.0, + "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": true, "isFooter": + false}, {"text": "Price", "rowIndex": 0, "columnIndex": 2, "boundingBox": + [5.8222, 4.691, 6.1417, 4.691, 6.1417, 4.816, 5.8222, 4.816], "confidence": + 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": true, "isFooter": + false}, {"text": "Gold Sponsor", "rowIndex": 1, "columnIndex": 0, "boundingBox": + [1.0764, 4.9048, 1.9861, 4.9048, 1.9861, 5.0527, 1.0764, 5.0527], "confidence": + 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": + false}, {"text": "Full booth Pre-keynote thank you Logo on poster Full page + ad in program guide", "rowIndex": 1, "columnIndex": 1, "boundingBox": [3.1694, + 4.9115, 5.2111, 4.9115, 5.2111, 5.7158, 3.1694, 5.7158], "confidence": 0.0, + "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": + false}, {"text": "$1,500", "rowIndex": 1, "columnIndex": 2, "boundingBox": + [5.8194, 4.8993, 6.2806, 4.8993, 6.2806, 5.0556, 5.8194, 5.0556], "confidence": + 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": + false}, {"text": "Silver Sponsor", "rowIndex": 2, "columnIndex": 0, "boundingBox": + [1.0722, 5.9792, 2.0444, 5.9792, 2.0444, 6.125, 1.0722, 6.125], "confidence": + 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": + false}, {"text": "Full booth Post-keynote thank you Logo on poster Half page + ad in program guide", "rowIndex": 2, "columnIndex": 1, "boundingBox": [3.1736, + 5.9809, 5.2333, 5.9809, 5.2333, 6.7778, 3.1736, 6.7778], "confidence": 0.0, + "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": + false}, {"text": "$1,200", "rowIndex": 2, "columnIndex": 2, "boundingBox": + [5.8222, 5.9549, 6.2847, 5.9549, 6.2847, 6.125, 5.8222, 6.125], "confidence": + 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": + false}, {"text": "Bronze Sponsor", "rowIndex": 3, "columnIndex": 0, "boundingBox": + [1.0764, 6.8352, 2.1458, 6.8352, 2.1458, 6.9794, 1.0764, 6.9794], "confidence": + 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": + false}, {"text": "Full booth Logo on poster 50% discount on program guide + advertisements", "rowIndex": 3, "columnIndex": 1, "boundingBox": [3.1806, + 6.8385, 5.3333, 6.8385, 5.3333, 7.6042, 3.1806, 7.6042], "confidence": 0.0, + "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": + false}, {"text": "$1,000", "rowIndex": 3, "columnIndex": 2, "boundingBox": + [5.8167, 6.816, 6.2917, 6.816, 6.2917, 6.9861, 5.8167, 6.9861], "confidence": + 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": + false}, {"text": "Full Booth", "rowIndex": 4, "columnIndex": 0, "boundingBox": + [1.0806, 7.6736, 1.75, 7.6736, 1.75, 7.8125, 1.0806, 7.8125], "confidence": + 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, "isHeader": false, "isFooter": + false}, {"text": "Full booth 50% discount on program guide advertisements", + "rowIndex": 4, "columnIndex": 1, "boundingBox": [3.1806, 7.684, 5.3403, 7.684, + 5.3403, 8.2396, 3.1806, 8.2396], "confidence": 0.0, "rowSpan": 1, "columnSpan": + 1, "elements": null, "isHeader": false, "isFooter": false}, {"text": "$600", + "rowIndex": 4, "columnIndex": 2, "boundingBox": [5.8167, 7.6701, 6.1458, 7.6701, + 6.1458, 7.8194, 5.8167, 7.8194], "confidence": 0.0, "rowSpan": 1, "columnSpan": + 1, "elements": null, "isHeader": false, "isFooter": false}, {"text": "Half + Booth", "rowIndex": 5, "columnIndex": 0, "boundingBox": [1.0694, 8.3125, 1.775, + 8.3125, 1.775, 8.4463, 1.0694, 8.4463], "confidence": 0.0, "rowSpan": 1, "columnSpan": + 1, "elements": null, "isHeader": false, "isFooter": false}, {"text": "Full + booth 25% discount on program guide advertisements", "rowIndex": 5, "columnIndex": + 1, "boundingBox": [3.1806, 8.3194, 5.3361, 8.3194, 5.3361, 8.875, 3.1806, + 8.875], "confidence": 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, + "isHeader": false, "isFooter": false}, {"text": "$350", "rowIndex": 5, "columnIndex": + 2, "boundingBox": [5.8222, 8.3021, 6.1528, 8.3021, 6.1528, 8.4479, 5.8222, + 8.4479], "confidence": 0.0, "rowSpan": 1, "columnSpan": 1, "elements": null, + "isHeader": false, "isFooter": false}]}], "clusterId": null}], "documentResults": + [], "errors": []}}' + headers: + apim-request-id: a3f501f5-6434-4d88-9a74-fbcbec8abdab + content-length: '5765' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 17:58:15 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '18' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/custom/models/39fb8ad8-9e3c-4695-b6fe-17c208381040/analyzeresults/8df403cc-038e-4b07-880b-45b7efaff893 +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_id_documents.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_id_documents.test_pages_kwarg_specified.yaml new file mode 100644 index 000000000000..7068b14999a3 --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_id_documents.test_pages_kwarg_specified.yaml @@ -0,0 +1,97 @@ +interactions: +- request: + body: '!!! The request body has been omitted from the recording because its size + 200581 is larger than 128KB. !!!' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '200581' + Content-Type: + - image/jpeg + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/idDocument/analyze?includeTextDetails=false&pages=1 + response: + body: + string: '' + headers: + apim-request-id: + - 91ef4348-a99c-4569-869f-799100c77106 + content-length: + - '0' + date: + - Thu, 11 Mar 2021 18:03:01 GMT + operation-location: + - https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/idDocument/analyzeResults/91ef4348-a99c-4569-869f-799100c77106 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '119' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/idDocument/analyzeResults/91ef4348-a99c-4569-869f-799100c77106 + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-03-11T18:03:01Z", + "lastUpdatedDateTime": "2021-03-11T18:03:04Z", "analyzeResult": {"version": + "2.1.0", "readResults": [{"page": 1, "angle": -0.1897, "width": 795, "height": + 501, "unit": "pixel"}], "documentResults": [{"docType": "prebuilt:idDocument:driverLicense", + "docTypeConfidence": 0.995, "pageRange": [1, 1], "fields": {"Address": {"type": + "string", "valueString": "123 NORTH MAIN STREET APT. 1 NORTH QUINCY, MA 02171-1748", + "text": "123 NORTH MAIN STREET APT. 1 NORTH QUINCY, MA 02171-1748", "boundingBox": + [339, 334, 636, 334, 636, 404, 339, 404], "page": 1, "confidence": 0.8}, "Country": + {"type": "country", "valueCountry": "USA", "confidence": 0.99}, "DateOfBirth": + {"type": "date", "valueDate": "1959-01-12", "text": "01/12/1959", "boundingBox": + [611, 198, 761, 198, 761, 227, 611, 228], "page": 1, "confidence": 0.994}, + "DateOfExpiration": {"type": "date", "valueDate": "2021-01-12", "text": "01/12/2021", + "boundingBox": [444, 198, 569, 197, 568, 222, 445, 222], "page": 1, "confidence": + 0.99}, "DocumentNumber": {"type": "string", "valueString": "S99988801", "text": + "S99988801", "boundingBox": [614, 154, 765, 153, 765, 183, 614, 183], "page": + 1, "confidence": 0.99}, "FirstName": {"type": "string", "valueString": "CONNOR", + "text": "CONNOR", "boundingBox": [339, 308, 420, 306, 419, 325, 339, 326], + "page": 1, "confidence": 0.907}, "LastName": {"type": "string", "valueString": + "SAMPLE", "text": "SAMPLE", "boundingBox": [341, 271, 460, 272, 459, 303, + 341, 303], "page": 1, "confidence": 0.951}, "Region": {"type": "string", "valueString": + "Massachusetts", "confidence": 0.99}, "Sex": {"type": "gender", "valueGender": + "M", "text": "M", "boundingBox": [398, 436, 409, 436, 408, 455, 398, 455], + "page": 1, "confidence": 0.99}}}]}}' + headers: + apim-request-id: + - cd684aac-3384-4552-9d3a-1ef9aebe46a5 + content-length: + - '1612' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 18:03:06 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '34' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_id_documents_async.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_id_documents_async.test_pages_kwarg_specified.yaml new file mode 100644 index 000000000000..0f1264cc954a --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_id_documents_async.test_pages_kwarg_specified.yaml @@ -0,0 +1,73 @@ +interactions: +- request: + body: '!!! The request body has been omitted from the recording because its size + 200581 is larger than 128KB. !!!' + headers: + Accept: + - application/json + Content-Type: + - image/jpeg + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/idDocument/analyze?includeTextDetails=false&pages=1 + response: + body: + string: '' + headers: + apim-request-id: a3585f72-64f4-40d0-bbc5-02c869a0f03a + content-length: '0' + date: Thu, 11 Mar 2021 18:02:16 GMT + operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/idDocument/analyzeResults/a3585f72-64f4-40d0-bbc5-02c869a0f03a + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '147' + status: + code: 202 + message: Accepted + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/idDocument/analyze?includeTextDetails=false&pages=1 +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/idDocument/analyzeResults/a3585f72-64f4-40d0-bbc5-02c869a0f03a + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-03-11T18:02:17Z", + "lastUpdatedDateTime": "2021-03-11T18:02:21Z", "analyzeResult": {"version": + "2.1.0", "readResults": [{"page": 1, "angle": -0.1897, "width": 795, "height": + 501, "unit": "pixel"}], "documentResults": [{"docType": "prebuilt:idDocument:driverLicense", + "docTypeConfidence": 0.995, "pageRange": [1, 1], "fields": {"Address": {"type": + "string", "valueString": "123 NORTH MAIN STREET APT. 1 NORTH QUINCY, MA 02171-1748", + "text": "123 NORTH MAIN STREET APT. 1 NORTH QUINCY, MA 02171-1748", "boundingBox": + [339, 334, 636, 334, 636, 404, 339, 404], "page": 1, "confidence": 0.8}, "Country": + {"type": "country", "valueCountry": "USA", "confidence": 0.99}, "DateOfBirth": + {"type": "date", "valueDate": "1959-01-12", "text": "01/12/1959", "boundingBox": + [611, 198, 761, 198, 761, 227, 611, 228], "page": 1, "confidence": 0.994}, + "DateOfExpiration": {"type": "date", "valueDate": "2021-01-12", "text": "01/12/2021", + "boundingBox": [444, 198, 569, 197, 568, 222, 445, 222], "page": 1, "confidence": + 0.99}, "DocumentNumber": {"type": "string", "valueString": "S99988801", "text": + "S99988801", "boundingBox": [614, 154, 765, 153, 765, 183, 614, 183], "page": + 1, "confidence": 0.99}, "FirstName": {"type": "string", "valueString": "CONNOR", + "text": "CONNOR", "boundingBox": [339, 308, 420, 306, 419, 325, 339, 326], + "page": 1, "confidence": 0.907}, "LastName": {"type": "string", "valueString": + "SAMPLE", "text": "SAMPLE", "boundingBox": [341, 271, 460, 272, 459, 303, + 341, 303], "page": 1, "confidence": 0.951}, "Region": {"type": "string", "valueString": + "Massachusetts", "confidence": 0.99}, "Sex": {"type": "gender", "valueGender": + "M", "text": "M", "boundingBox": [398, 436, 409, 436, 408, 455, 398, 455], + "page": 1, "confidence": 0.99}}}]}}' + headers: + apim-request-id: bb2fc542-dde4-4c81-b7ab-1136e65079fc + content-length: '1612' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 18:02:21 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '25' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/idDocument/analyzeResults/a3585f72-64f4-40d0-bbc5-02c869a0f03a +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_id_documents_from_url.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_id_documents_from_url.test_pages_kwarg_specified.yaml new file mode 100644 index 000000000000..a79c6e52c68d --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_id_documents_from_url.test_pages_kwarg_specified.yaml @@ -0,0 +1,96 @@ +interactions: +- request: + body: 'b''{"source": "blob_sas_url"}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '226' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/idDocument/analyze?includeTextDetails=false&pages=1 + response: + body: + string: '' + headers: + apim-request-id: + - 7f898b9e-afc6-43f4-8e23-ce2dab3665fc + content-length: + - '0' + date: + - Thu, 11 Mar 2021 18:02:47 GMT + operation-location: + - https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/idDocument/analyzeResults/7f898b9e-afc6-43f4-8e23-ce2dab3665fc + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '96' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/idDocument/analyzeResults/7f898b9e-afc6-43f4-8e23-ce2dab3665fc + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-03-11T18:02:48Z", + "lastUpdatedDateTime": "2021-03-11T18:02:51Z", "analyzeResult": {"version": + "2.1.0", "readResults": [{"page": 1, "angle": -0.4021, "width": 506, "height": + 319, "unit": "pixel"}], "documentResults": [{"docType": "prebuilt:idDocument:driverLicense", + "docTypeConfidence": 0.995, "pageRange": [1, 1], "fields": {"Address": {"type": + "string", "valueString": "123 MAIN STREET APT. 1 HARRISBURG, PA 17101-0000", + "text": "123 MAIN STREET APT. 1 HARRISBURG, PA 17101-0000", "boundingBox": + [178, 161, 357, 161, 357, 195, 178, 195], "page": 1, "confidence": 0.906}, + "Country": {"type": "country", "valueCountry": "USA", "confidence": 0.99}, + "DateOfBirth": {"type": "date", "valueDate": "1975-08-04", "text": "08/04/1975", + "boundingBox": [215, 93, 309, 92, 309, 109, 215, 108], "page": 1, "confidence": + 0.995}, "DateOfExpiration": {"type": "date", "valueDate": "2023-08-05", "text": + "08/05/2023", "boundingBox": [215, 113, 307, 112, 307, 129, 215, 129], "page": + 1, "confidence": 0.99}, "DocumentNumber": {"type": "string", "valueString": + "99 999 999", "text": "99 999 999", "boundingBox": [216, 74, 307, 74, 307, + 91, 216, 91], "page": 1, "confidence": 0.991}, "FirstName": {"type": "string", + "valueString": "JANICE ANN", "text": "JANICE ANN", "boundingBox": [177, 147, + 264, 147, 264, 161, 177, 161], "page": 1, "confidence": 0.987}, "LastName": + {"type": "string", "valueString": "SAMPLE", "text": "SAMPLE", "boundingBox": + [178, 135, 237, 134, 236, 147, 179, 147], "page": 1, "confidence": 0.986}, + "Region": {"type": "string", "valueString": "Pennsylvania", "confidence": + 0.99}, "Sex": {"type": "gender", "valueGender": "F", "text": "F", "boundingBox": + [210, 199, 216, 199, 217, 211, 210, 211], "page": 1, "confidence": 0.99}}}]}}' + headers: + apim-request-id: + - 126b4ea4-a5f6-4ffa-94ac-bf17b30faba0 + content-length: + - '1602' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 18:02:52 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '14' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_id_documents_from_url_async.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_id_documents_from_url_async.test_pages_kwarg_specified.yaml new file mode 100644 index 000000000000..7230278a6cdf --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_id_documents_from_url_async.test_pages_kwarg_specified.yaml @@ -0,0 +1,74 @@ +interactions: +- request: + body: 'b''{"source": "blob_sas_url"}''' + headers: + Accept: + - application/json + Content-Length: + - '226' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/idDocument/analyze?includeTextDetails=false&pages=1 + response: + body: + string: '' + headers: + apim-request-id: 76d2cf11-35f7-4482-b56c-7c4f4113aa62 + content-length: '0' + date: Thu, 11 Mar 2021 18:02:31 GMT + operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/idDocument/analyzeResults/76d2cf11-35f7-4482-b56c-7c4f4113aa62 + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '107' + status: + code: 202 + message: Accepted + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/idDocument/analyze?includeTextDetails=false&pages=1 +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/idDocument/analyzeResults/76d2cf11-35f7-4482-b56c-7c4f4113aa62 + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-03-11T18:02:32Z", + "lastUpdatedDateTime": "2021-03-11T18:02:34Z", "analyzeResult": {"version": + "2.1.0", "readResults": [{"page": 1, "angle": -0.4021, "width": 506, "height": + 319, "unit": "pixel"}], "documentResults": [{"docType": "prebuilt:idDocument:driverLicense", + "docTypeConfidence": 0.995, "pageRange": [1, 1], "fields": {"Address": {"type": + "string", "valueString": "123 MAIN STREET APT. 1 HARRISBURG, PA 17101-0000", + "text": "123 MAIN STREET APT. 1 HARRISBURG, PA 17101-0000", "boundingBox": + [178, 161, 357, 161, 357, 195, 178, 195], "page": 1, "confidence": 0.906}, + "Country": {"type": "country", "valueCountry": "USA", "confidence": 0.99}, + "DateOfBirth": {"type": "date", "valueDate": "1975-08-04", "text": "08/04/1975", + "boundingBox": [215, 93, 309, 92, 309, 109, 215, 108], "page": 1, "confidence": + 0.995}, "DateOfExpiration": {"type": "date", "valueDate": "2023-08-05", "text": + "08/05/2023", "boundingBox": [215, 113, 307, 112, 307, 129, 215, 129], "page": + 1, "confidence": 0.99}, "DocumentNumber": {"type": "string", "valueString": + "99 999 999", "text": "99 999 999", "boundingBox": [216, 74, 307, 74, 307, + 91, 216, 91], "page": 1, "confidence": 0.991}, "FirstName": {"type": "string", + "valueString": "JANICE ANN", "text": "JANICE ANN", "boundingBox": [177, 147, + 264, 147, 264, 161, 177, 161], "page": 1, "confidence": 0.987}, "LastName": + {"type": "string", "valueString": "SAMPLE", "text": "SAMPLE", "boundingBox": + [178, 135, 237, 134, 236, 147, 179, 147], "page": 1, "confidence": 0.986}, + "Region": {"type": "string", "valueString": "Pennsylvania", "confidence": + 0.99}, "Sex": {"type": "gender", "valueGender": "F", "text": "F", "boundingBox": + [210, 199, 216, 199, 217, 211, 210, 211], "page": 1, "confidence": 0.99}}}]}}' + headers: + apim-request-id: a28316b9-22e6-4f58-9e45-9c9039dd07b1 + content-length: '1602' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 18:02:36 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '18' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/idDocument/analyzeResults/76d2cf11-35f7-4482-b56c-7c4f4113aa62 +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_invoice.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_invoice.test_pages_kwarg_specified.yaml new file mode 100644 index 000000000000..79b22982fe1e --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_invoice.test_pages_kwarg_specified.yaml @@ -0,0 +1,137 @@ +interactions: +- request: + body: '!!! The request body has been omitted from the recording because its size + 147362 is larger than 128KB. !!!' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '147362' + Content-Type: + - application/pdf + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/invoice/analyze?includeTextDetails=false&pages=1 + response: + body: + string: '' + headers: + apim-request-id: + - e3cd0111-6ea8-4e59-a09d-52e8d022d69c + content-length: + - '0' + date: + - Thu, 11 Mar 2021 18:06:40 GMT + operation-location: + - https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/invoice/analyzeResults/e3cd0111-6ea8-4e59-a09d-52e8d022d69c + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '168' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/invoice/analyzeResults/e3cd0111-6ea8-4e59-a09d-52e8d022d69c + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-03-11T18:06:41Z", + "lastUpdatedDateTime": "2021-03-11T18:06:46Z", "analyzeResult": {"version": + "2.1.0", "readResults": [{"page": 1, "angle": 0, "width": 8.5, "height": 11, + "unit": "inch"}], "pageResults": [{"page": 1, "tables": [{"rows": 3, "columns": + 6, "cells": [{"rowIndex": 0, "columnIndex": 0, "text": "Invoice Number", "boundingBox": + [0.5136, 2.7829, 1.8978, 2.79, 1.8978, 3.311, 0.5136, 3.311]}, {"rowIndex": + 0, "columnIndex": 1, "text": "Invoice Date", "boundingBox": [1.8978, 2.79, + 3.2964, 2.79, 3.3036, 3.311, 1.8978, 3.311]}, {"rowIndex": 0, "columnIndex": + 2, "text": "Invoice Due Date", "boundingBox": [3.2964, 2.79, 4.7022, 2.79, + 4.7094, 3.311, 3.3036, 3.311]}, {"rowIndex": 0, "columnIndex": 3, "columnSpan": + 2, "text": "Charges", "boundingBox": [4.7022, 2.79, 6.1079, 2.7829, 6.1079, + 3.311, 4.7094, 3.311]}, {"rowIndex": 0, "columnIndex": 5, "text": "VAT ID", + "boundingBox": [6.1079, 2.7829, 7.485, 2.7829, 7.4922, 3.311, 6.1079, 3.311]}, + {"rowIndex": 1, "columnIndex": 0, "rowSpan": 2, "text": "34278587", "boundingBox": + [0.5136, 3.311, 1.8978, 3.311, 1.8978, 3.8534, 0.5136, 3.8534]}, {"rowIndex": + 1, "columnIndex": 1, "rowSpan": 2, "text": "6/18/2017", "boundingBox": [1.8978, + 3.311, 3.3036, 3.311, 3.3036, 3.8534, 1.8978, 3.8534]}, {"rowIndex": 1, "columnIndex": + 2, "rowSpan": 2, "text": "6/24/2017", "boundingBox": [3.3036, 3.311, 4.7094, + 3.311, 4.7165, 3.8534, 3.3036, 3.8534]}, {"rowIndex": 1, "columnIndex": 3, + "rowSpan": 2, "columnSpan": 2, "text": "$56,651.49", "boundingBox": [4.7094, + 3.311, 6.1079, 3.311, 6.1079, 3.8534, 4.7165, 3.8534]}, {"rowIndex": 1, "columnIndex": + 5, "text": "PT", "boundingBox": [6.1079, 3.311, 7.4922, 3.311, 7.4922, 3.6393, + 6.1079, 3.6393]}, {"rowIndex": 2, "columnIndex": 5, "boundingBox": [6.1079, + 3.6393, 7.4922, 3.6393, 7.4922, 3.8534, 6.1079, 3.8534], "text": ""}], "boundingBox": + [0.4985, 2.7802, 7.4933, 2.7816, 7.4913, 3.8459, 0.4966, 3.8447]}]}], "documentResults": + [{"docType": "prebuilt:invoice", "pageRange": [1, 1], "fields": {"CustomerAddress": + {"type": "string", "valueString": "1020 Enterprise Way Sunnayvale, CA 87659", + "text": "1020 Enterprise Way Sunnayvale, CA 87659", "boundingBox": [5.196, + 1.716, 6.6526, 1.716, 6.6526, 2.0359, 5.196, 2.0359], "page": 1, "confidence": + 0.954}, "CustomerAddressRecipient": {"type": "string", "valueString": "Microsoft", + "text": "Microsoft", "boundingBox": [5.2045, 1.5114, 5.8155, 1.5114, 5.8155, + 1.6151, 5.2045, 1.6151], "page": 1, "confidence": 0.981}, "CustomerName": + {"type": "string", "valueString": "Microsoft", "text": "Microsoft", "boundingBox": + [5.2045, 1.5114, 5.8155, 1.5114, 5.8155, 1.6151, 5.2045, 1.6151], "page": + 1, "confidence": 0.981}, "DueDate": {"type": "date", "valueDate": "2017-06-24", + "text": "6/24/2017", "boundingBox": [3.346, 3.41, 3.9514, 3.41, 3.9514, 3.5144, + 3.346, 3.5144], "page": 1, "confidence": 0.981}, "InvoiceDate": {"type": "date", + "valueDate": "2017-06-18", "text": "6/18/2017", "boundingBox": [1.9455, 3.41, + 2.551, 3.41, 2.551, 3.5144, 1.9455, 3.5144], "page": 1, "confidence": 0.968}, + "InvoiceId": {"type": "string", "valueString": "34278587", "text": "34278587", + "boundingBox": [0.5397, 3.411, 1.1457, 3.411, 1.1457, 3.5144, 0.5397, 3.5144], + "page": 1, "confidence": 0.973}, "InvoiceTotal": {"type": "number", "valueNumber": + 56651.49, "text": "$56,651.49", "boundingBox": [5.3871, 3.4047, 6.0702, 3.4047, + 6.0702, 3.5321, 5.3871, 3.5321], "page": 1, "confidence": 0.307}, "Items": + {"type": "array", "valueArray": [{"type": "object", "valueObject": {"Amount": + {"type": "number", "valueNumber": 56651.49, "text": "$56,651.49", "boundingBox": + [5.3871, 3.4047, 6.0702, 3.4047, 6.0702, 3.5321, 5.3871, 3.5321], "page": + 1, "confidence": 0.782}, "Date": {"type": "date", "valueDate": "2017-06-18", + "text": "6/18/2017", "boundingBox": [1.9455, 3.41, 2.551, 3.41, 2.551, 3.5144, + 1.9455, 3.5144], "page": 1, "confidence": 0.287}, "ProductCode": {"type": + "string", "valueString": "34278587", "text": "34278587", "boundingBox": [0.5397, + 3.411, 1.1457, 3.411, 1.1457, 3.5144, 0.5397, 3.5144], "page": 1, "confidence": + 0.657}, "Tax": {"type": "number", "text": "PT", "boundingBox": [6.2285, 3.4114, + 6.3919, 3.4114, 6.3919, 3.5119, 6.2285, 3.5119], "page": 1, "confidence": + 0.691}}, "text": "34278587 6/18/2017 6/24/2017 $56,651.49 PT", "boundingBox": + [0.5397, 3.4047, 6.3919, 3.4047, 6.3919, 3.5321, 0.5397, 3.5321], "page": + 1, "confidence": 0.855}]}, "VendorAddress": {"type": "string", "valueString": + "1 Redmond way Suite 6000 Redmond, WA 99243", "text": "1 Redmond way Suite + 6000 Redmond, WA 99243", "boundingBox": [0.8019, 1.7033, 2.1445, 1.7033, 2.1445, + 2.1911, 0.8019, 2.1911], "page": 1, "confidence": 0.953}, "VendorName": {"type": + "string", "valueString": "Contoso", "text": "Contoso", "boundingBox": [0.5384, + 1.1583, 1.4466, 1.1583, 1.4466, 1.3534, 0.5384, 1.3534], "page": 1, "confidence": + 0.981}}}]}}' + headers: + apim-request-id: + - 9e060cde-de73-4a5c-be31-3fc5938a4a5b + content-length: + - '4392' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 18:06:45 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '16' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_invoice_async.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_invoice_async.test_pages_kwarg_specified.yaml new file mode 100644 index 000000000000..c393b4859d6f --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_invoice_async.test_pages_kwarg_specified.yaml @@ -0,0 +1,113 @@ +interactions: +- request: + body: '!!! The request body has been omitted from the recording because its size + 147362 is larger than 128KB. !!!' + headers: + Accept: + - application/json + Content-Type: + - application/pdf + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/invoice/analyze?includeTextDetails=false&pages=1 + response: + body: + string: '' + headers: + apim-request-id: 024e5af9-35d4-48df-80b9-6503025cc5e8 + content-length: '0' + date: Thu, 11 Mar 2021 18:03:19 GMT + operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/invoice/analyzeResults/024e5af9-35d4-48df-80b9-6503025cc5e8 + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '190' + status: + code: 202 + message: Accepted + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/invoice/analyze?includeTextDetails=false&pages=1 +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/invoice/analyzeResults/024e5af9-35d4-48df-80b9-6503025cc5e8 + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-03-11T18:03:19Z", + "lastUpdatedDateTime": "2021-03-11T18:03:24Z", "analyzeResult": {"version": + "2.1.0", "readResults": [{"page": 1, "angle": 0, "width": 8.5, "height": 11, + "unit": "inch"}], "pageResults": [{"page": 1, "tables": [{"rows": 3, "columns": + 6, "cells": [{"rowIndex": 0, "columnIndex": 0, "text": "Invoice Number", "boundingBox": + [0.5136, 2.7829, 1.8978, 2.79, 1.8978, 3.311, 0.5136, 3.311]}, {"rowIndex": + 0, "columnIndex": 1, "text": "Invoice Date", "boundingBox": [1.8978, 2.79, + 3.2964, 2.79, 3.3036, 3.311, 1.8978, 3.311]}, {"rowIndex": 0, "columnIndex": + 2, "text": "Invoice Due Date", "boundingBox": [3.2964, 2.79, 4.7022, 2.79, + 4.7094, 3.311, 3.3036, 3.311]}, {"rowIndex": 0, "columnIndex": 3, "columnSpan": + 2, "text": "Charges", "boundingBox": [4.7022, 2.79, 6.1079, 2.7829, 6.1079, + 3.311, 4.7094, 3.311]}, {"rowIndex": 0, "columnIndex": 5, "text": "VAT ID", + "boundingBox": [6.1079, 2.7829, 7.485, 2.7829, 7.4922, 3.311, 6.1079, 3.311]}, + {"rowIndex": 1, "columnIndex": 0, "rowSpan": 2, "text": "34278587", "boundingBox": + [0.5136, 3.311, 1.8978, 3.311, 1.8978, 3.8534, 0.5136, 3.8534]}, {"rowIndex": + 1, "columnIndex": 1, "rowSpan": 2, "text": "6/18/2017", "boundingBox": [1.8978, + 3.311, 3.3036, 3.311, 3.3036, 3.8534, 1.8978, 3.8534]}, {"rowIndex": 1, "columnIndex": + 2, "rowSpan": 2, "text": "6/24/2017", "boundingBox": [3.3036, 3.311, 4.7094, + 3.311, 4.7165, 3.8534, 3.3036, 3.8534]}, {"rowIndex": 1, "columnIndex": 3, + "rowSpan": 2, "columnSpan": 2, "text": "$56,651.49", "boundingBox": [4.7094, + 3.311, 6.1079, 3.311, 6.1079, 3.8534, 4.7165, 3.8534]}, {"rowIndex": 1, "columnIndex": + 5, "text": "PT", "boundingBox": [6.1079, 3.311, 7.4922, 3.311, 7.4922, 3.6393, + 6.1079, 3.6393]}, {"rowIndex": 2, "columnIndex": 5, "boundingBox": [6.1079, + 3.6393, 7.4922, 3.6393, 7.4922, 3.8534, 6.1079, 3.8534], "text": ""}], "boundingBox": + [0.4985, 2.7802, 7.4933, 2.7816, 7.4913, 3.8459, 0.4966, 3.8447]}]}], "documentResults": + [{"docType": "prebuilt:invoice", "pageRange": [1, 1], "fields": {"CustomerAddress": + {"type": "string", "valueString": "1020 Enterprise Way Sunnayvale, CA 87659", + "text": "1020 Enterprise Way Sunnayvale, CA 87659", "boundingBox": [5.196, + 1.716, 6.6526, 1.716, 6.6526, 2.0359, 5.196, 2.0359], "page": 1, "confidence": + 0.954}, "CustomerAddressRecipient": {"type": "string", "valueString": "Microsoft", + "text": "Microsoft", "boundingBox": [5.2045, 1.5114, 5.8155, 1.5114, 5.8155, + 1.6151, 5.2045, 1.6151], "page": 1, "confidence": 0.981}, "CustomerName": + {"type": "string", "valueString": "Microsoft", "text": "Microsoft", "boundingBox": + [5.2045, 1.5114, 5.8155, 1.5114, 5.8155, 1.6151, 5.2045, 1.6151], "page": + 1, "confidence": 0.981}, "DueDate": {"type": "date", "valueDate": "2017-06-24", + "text": "6/24/2017", "boundingBox": [3.346, 3.41, 3.9514, 3.41, 3.9514, 3.5144, + 3.346, 3.5144], "page": 1, "confidence": 0.981}, "InvoiceDate": {"type": "date", + "valueDate": "2017-06-18", "text": "6/18/2017", "boundingBox": [1.9455, 3.41, + 2.551, 3.41, 2.551, 3.5144, 1.9455, 3.5144], "page": 1, "confidence": 0.968}, + "InvoiceId": {"type": "string", "valueString": "34278587", "text": "34278587", + "boundingBox": [0.5397, 3.411, 1.1457, 3.411, 1.1457, 3.5144, 0.5397, 3.5144], + "page": 1, "confidence": 0.973}, "InvoiceTotal": {"type": "number", "valueNumber": + 56651.49, "text": "$56,651.49", "boundingBox": [5.3871, 3.4047, 6.0702, 3.4047, + 6.0702, 3.5321, 5.3871, 3.5321], "page": 1, "confidence": 0.307}, "Items": + {"type": "array", "valueArray": [{"type": "object", "valueObject": {"Amount": + {"type": "number", "valueNumber": 56651.49, "text": "$56,651.49", "boundingBox": + [5.3871, 3.4047, 6.0702, 3.4047, 6.0702, 3.5321, 5.3871, 3.5321], "page": + 1, "confidence": 0.782}, "Date": {"type": "date", "valueDate": "2017-06-18", + "text": "6/18/2017", "boundingBox": [1.9455, 3.41, 2.551, 3.41, 2.551, 3.5144, + 1.9455, 3.5144], "page": 1, "confidence": 0.287}, "ProductCode": {"type": + "string", "valueString": "34278587", "text": "34278587", "boundingBox": [0.5397, + 3.411, 1.1457, 3.411, 1.1457, 3.5144, 0.5397, 3.5144], "page": 1, "confidence": + 0.657}, "Tax": {"type": "number", "text": "PT", "boundingBox": [6.2285, 3.4114, + 6.3919, 3.4114, 6.3919, 3.5119, 6.2285, 3.5119], "page": 1, "confidence": + 0.691}}, "text": "34278587 6/18/2017 6/24/2017 $56,651.49 PT", "boundingBox": + [0.5397, 3.4047, 6.3919, 3.4047, 6.3919, 3.5321, 0.5397, 3.5321], "page": + 1, "confidence": 0.855}]}, "VendorAddress": {"type": "string", "valueString": + "1 Redmond way Suite 6000 Redmond, WA 99243", "text": "1 Redmond way Suite + 6000 Redmond, WA 99243", "boundingBox": [0.8019, 1.7033, 2.1445, 1.7033, 2.1445, + 2.1911, 0.8019, 2.1911], "page": 1, "confidence": 0.953}, "VendorName": {"type": + "string", "valueString": "Contoso", "text": "Contoso", "boundingBox": [0.5384, + 1.1583, 1.4466, 1.1583, 1.4466, 1.3534, 0.5384, 1.3534], "page": 1, "confidence": + 0.981}}}]}}' + headers: + apim-request-id: 4be50902-b41b-4bbd-95dd-dd7afe9e1721 + content-length: '4392' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 18:03:24 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '15' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/invoice/analyzeResults/024e5af9-35d4-48df-80b9-6503025cc5e8 +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_invoice_from_url.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_invoice_from_url.test_pages_kwarg_specified.yaml new file mode 100644 index 000000000000..1ec853aebf7f --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_invoice_from_url.test_pages_kwarg_specified.yaml @@ -0,0 +1,136 @@ +interactions: +- request: + body: 'b''{"source": "blob_sas_url"}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '226' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/invoice/analyze?includeTextDetails=false&pages=1 + response: + body: + string: '' + headers: + apim-request-id: + - 46ac5392-6467-4de2-944e-acd90ece345a + content-length: + - '0' + date: + - Thu, 11 Mar 2021 18:06:14 GMT + operation-location: + - https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/invoice/analyzeResults/46ac5392-6467-4de2-944e-acd90ece345a + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '797' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/invoice/analyzeResults/46ac5392-6467-4de2-944e-acd90ece345a + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-03-11T18:06:15Z", + "lastUpdatedDateTime": "2021-03-11T18:06:20Z", "analyzeResult": {"version": + "2.1.0", "readResults": [{"page": 1, "angle": 0, "width": 8.5, "height": 11, + "unit": "inch"}], "pageResults": [{"page": 1, "tables": [{"rows": 3, "columns": + 6, "cells": [{"rowIndex": 0, "columnIndex": 0, "text": "Invoice Number", "boundingBox": + [0.5136, 2.7829, 1.8978, 2.79, 1.8978, 3.311, 0.5136, 3.311]}, {"rowIndex": + 0, "columnIndex": 1, "text": "Invoice Date", "boundingBox": [1.8978, 2.79, + 3.2964, 2.79, 3.3036, 3.311, 1.8978, 3.311]}, {"rowIndex": 0, "columnIndex": + 2, "text": "Invoice Due Date", "boundingBox": [3.2964, 2.79, 4.7022, 2.79, + 4.7094, 3.311, 3.3036, 3.311]}, {"rowIndex": 0, "columnIndex": 3, "columnSpan": + 2, "text": "Charges", "boundingBox": [4.7022, 2.79, 6.1079, 2.7829, 6.1079, + 3.311, 4.7094, 3.311]}, {"rowIndex": 0, "columnIndex": 5, "text": "VAT ID", + "boundingBox": [6.1079, 2.7829, 7.485, 2.7829, 7.4922, 3.311, 6.1079, 3.311]}, + {"rowIndex": 1, "columnIndex": 0, "rowSpan": 2, "text": "34278587", "boundingBox": + [0.5136, 3.311, 1.8978, 3.311, 1.8978, 3.8534, 0.5136, 3.8534]}, {"rowIndex": + 1, "columnIndex": 1, "rowSpan": 2, "text": "6/18/2017", "boundingBox": [1.8978, + 3.311, 3.3036, 3.311, 3.3036, 3.8534, 1.8978, 3.8534]}, {"rowIndex": 1, "columnIndex": + 2, "rowSpan": 2, "text": "6/24/2017", "boundingBox": [3.3036, 3.311, 4.7094, + 3.311, 4.7165, 3.8534, 3.3036, 3.8534]}, {"rowIndex": 1, "columnIndex": 3, + "rowSpan": 2, "columnSpan": 2, "text": "$56,651.49", "boundingBox": [4.7094, + 3.311, 6.1079, 3.311, 6.1079, 3.8534, 4.7165, 3.8534]}, {"rowIndex": 1, "columnIndex": + 5, "text": "PT", "boundingBox": [6.1079, 3.311, 7.4922, 3.311, 7.4922, 3.6393, + 6.1079, 3.6393]}, {"rowIndex": 2, "columnIndex": 5, "boundingBox": [6.1079, + 3.6393, 7.4922, 3.6393, 7.4922, 3.8534, 6.1079, 3.8534], "text": ""}], "boundingBox": + [0.4985, 2.7802, 7.4933, 2.7816, 7.4913, 3.8459, 0.4966, 3.8447]}]}], "documentResults": + [{"docType": "prebuilt:invoice", "pageRange": [1, 1], "fields": {"CustomerAddress": + {"type": "string", "valueString": "1020 Enterprise Way Sunnayvale, CA 87659", + "text": "1020 Enterprise Way Sunnayvale, CA 87659", "boundingBox": [5.196, + 1.716, 6.6526, 1.716, 6.6526, 2.0359, 5.196, 2.0359], "page": 1, "confidence": + 0.954}, "CustomerAddressRecipient": {"type": "string", "valueString": "Microsoft", + "text": "Microsoft", "boundingBox": [5.2045, 1.5114, 5.8155, 1.5114, 5.8155, + 1.6151, 5.2045, 1.6151], "page": 1, "confidence": 0.981}, "CustomerName": + {"type": "string", "valueString": "Microsoft", "text": "Microsoft", "boundingBox": + [5.2045, 1.5114, 5.8155, 1.5114, 5.8155, 1.6151, 5.2045, 1.6151], "page": + 1, "confidence": 0.981}, "DueDate": {"type": "date", "valueDate": "2017-06-24", + "text": "6/24/2017", "boundingBox": [3.346, 3.41, 3.9514, 3.41, 3.9514, 3.5144, + 3.346, 3.5144], "page": 1, "confidence": 0.981}, "InvoiceDate": {"type": "date", + "valueDate": "2017-06-18", "text": "6/18/2017", "boundingBox": [1.9455, 3.41, + 2.551, 3.41, 2.551, 3.5144, 1.9455, 3.5144], "page": 1, "confidence": 0.968}, + "InvoiceId": {"type": "string", "valueString": "34278587", "text": "34278587", + "boundingBox": [0.5397, 3.411, 1.1457, 3.411, 1.1457, 3.5144, 0.5397, 3.5144], + "page": 1, "confidence": 0.973}, "InvoiceTotal": {"type": "number", "valueNumber": + 56651.49, "text": "$56,651.49", "boundingBox": [5.3871, 3.4047, 6.0702, 3.4047, + 6.0702, 3.5321, 5.3871, 3.5321], "page": 1, "confidence": 0.307}, "Items": + {"type": "array", "valueArray": [{"type": "object", "valueObject": {"Amount": + {"type": "number", "valueNumber": 56651.49, "text": "$56,651.49", "boundingBox": + [5.3871, 3.4047, 6.0702, 3.4047, 6.0702, 3.5321, 5.3871, 3.5321], "page": + 1, "confidence": 0.782}, "Date": {"type": "date", "valueDate": "2017-06-18", + "text": "6/18/2017", "boundingBox": [1.9455, 3.41, 2.551, 3.41, 2.551, 3.5144, + 1.9455, 3.5144], "page": 1, "confidence": 0.287}, "ProductCode": {"type": + "string", "valueString": "34278587", "text": "34278587", "boundingBox": [0.5397, + 3.411, 1.1457, 3.411, 1.1457, 3.5144, 0.5397, 3.5144], "page": 1, "confidence": + 0.657}, "Tax": {"type": "number", "text": "PT", "boundingBox": [6.2285, 3.4114, + 6.3919, 3.4114, 6.3919, 3.5119, 6.2285, 3.5119], "page": 1, "confidence": + 0.691}}, "text": "34278587 6/18/2017 6/24/2017 $56,651.49 PT", "boundingBox": + [0.5397, 3.4047, 6.3919, 3.4047, 6.3919, 3.5321, 0.5397, 3.5321], "page": + 1, "confidence": 0.855}]}, "VendorAddress": {"type": "string", "valueString": + "1 Redmond way Suite 6000 Redmond, WA 99243", "text": "1 Redmond way Suite + 6000 Redmond, WA 99243", "boundingBox": [0.8019, 1.7033, 2.1445, 1.7033, 2.1445, + 2.1911, 0.8019, 2.1911], "page": 1, "confidence": 0.953}, "VendorName": {"type": + "string", "valueString": "Contoso", "text": "Contoso", "boundingBox": [0.5384, + 1.1583, 1.4466, 1.1583, 1.4466, 1.3534, 0.5384, 1.3534], "page": 1, "confidence": + 0.981}}}]}}' + headers: + apim-request-id: + - f515ae25-b5bc-42cf-adad-ae095a337f51 + content-length: + - '4392' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 18:06:21 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '15' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_invoice_from_url_async.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_invoice_from_url_async.test_pages_kwarg_specified.yaml new file mode 100644 index 000000000000..7a9d5e01c1a1 --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_invoice_from_url_async.test_pages_kwarg_specified.yaml @@ -0,0 +1,137 @@ +interactions: +- request: + body: 'b''{"source": "blob_sas_url"}''' + headers: + Accept: + - application/json + Content-Length: + - '226' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/invoice/analyze?includeTextDetails=false&pages=1 + response: + body: + string: '' + headers: + apim-request-id: 884301f8-271e-4e49-9171-a6cad2b7cc5f + content-length: '0' + date: Thu, 11 Mar 2021 18:05:41 GMT + operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/invoice/analyzeResults/884301f8-271e-4e49-9171-a6cad2b7cc5f + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '201' + status: + code: 202 + message: Accepted + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/invoice/analyze?includeTextDetails=false&pages=1 +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/invoice/analyzeResults/884301f8-271e-4e49-9171-a6cad2b7cc5f + response: + body: + string: '{"status": "running", "createdDateTime": "2021-03-11T18:05:42Z", "lastUpdatedDateTime": + "2021-03-11T18:05:42Z"}' + headers: + apim-request-id: d5cf4ba2-1688-4403-bc88-a01206a11b95 + content-length: '106' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 18:05:47 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '10' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/invoice/analyzeResults/884301f8-271e-4e49-9171-a6cad2b7cc5f +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/invoice/analyzeResults/884301f8-271e-4e49-9171-a6cad2b7cc5f + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-03-11T18:05:42Z", + "lastUpdatedDateTime": "2021-03-11T18:05:47Z", "analyzeResult": {"version": + "2.1.0", "readResults": [{"page": 1, "angle": 0, "width": 8.5, "height": 11, + "unit": "inch"}], "pageResults": [{"page": 1, "tables": [{"rows": 3, "columns": + 6, "cells": [{"rowIndex": 0, "columnIndex": 0, "text": "Invoice Number", "boundingBox": + [0.5136, 2.7829, 1.8978, 2.79, 1.8978, 3.311, 0.5136, 3.311]}, {"rowIndex": + 0, "columnIndex": 1, "text": "Invoice Date", "boundingBox": [1.8978, 2.79, + 3.2964, 2.79, 3.3036, 3.311, 1.8978, 3.311]}, {"rowIndex": 0, "columnIndex": + 2, "text": "Invoice Due Date", "boundingBox": [3.2964, 2.79, 4.7022, 2.79, + 4.7094, 3.311, 3.3036, 3.311]}, {"rowIndex": 0, "columnIndex": 3, "columnSpan": + 2, "text": "Charges", "boundingBox": [4.7022, 2.79, 6.1079, 2.7829, 6.1079, + 3.311, 4.7094, 3.311]}, {"rowIndex": 0, "columnIndex": 5, "text": "VAT ID", + "boundingBox": [6.1079, 2.7829, 7.485, 2.7829, 7.4922, 3.311, 6.1079, 3.311]}, + {"rowIndex": 1, "columnIndex": 0, "rowSpan": 2, "text": "34278587", "boundingBox": + [0.5136, 3.311, 1.8978, 3.311, 1.8978, 3.8534, 0.5136, 3.8534]}, {"rowIndex": + 1, "columnIndex": 1, "rowSpan": 2, "text": "6/18/2017", "boundingBox": [1.8978, + 3.311, 3.3036, 3.311, 3.3036, 3.8534, 1.8978, 3.8534]}, {"rowIndex": 1, "columnIndex": + 2, "rowSpan": 2, "text": "6/24/2017", "boundingBox": [3.3036, 3.311, 4.7094, + 3.311, 4.7165, 3.8534, 3.3036, 3.8534]}, {"rowIndex": 1, "columnIndex": 3, + "rowSpan": 2, "columnSpan": 2, "text": "$56,651.49", "boundingBox": [4.7094, + 3.311, 6.1079, 3.311, 6.1079, 3.8534, 4.7165, 3.8534]}, {"rowIndex": 1, "columnIndex": + 5, "text": "PT", "boundingBox": [6.1079, 3.311, 7.4922, 3.311, 7.4922, 3.6393, + 6.1079, 3.6393]}, {"rowIndex": 2, "columnIndex": 5, "boundingBox": [6.1079, + 3.6393, 7.4922, 3.6393, 7.4922, 3.8534, 6.1079, 3.8534], "text": ""}], "boundingBox": + [0.4985, 2.7802, 7.4933, 2.7816, 7.4913, 3.8459, 0.4966, 3.8447]}]}], "documentResults": + [{"docType": "prebuilt:invoice", "pageRange": [1, 1], "fields": {"CustomerAddress": + {"type": "string", "valueString": "1020 Enterprise Way Sunnayvale, CA 87659", + "text": "1020 Enterprise Way Sunnayvale, CA 87659", "boundingBox": [5.196, + 1.716, 6.6526, 1.716, 6.6526, 2.0359, 5.196, 2.0359], "page": 1, "confidence": + 0.954}, "CustomerAddressRecipient": {"type": "string", "valueString": "Microsoft", + "text": "Microsoft", "boundingBox": [5.2045, 1.5114, 5.8155, 1.5114, 5.8155, + 1.6151, 5.2045, 1.6151], "page": 1, "confidence": 0.981}, "CustomerName": + {"type": "string", "valueString": "Microsoft", "text": "Microsoft", "boundingBox": + [5.2045, 1.5114, 5.8155, 1.5114, 5.8155, 1.6151, 5.2045, 1.6151], "page": + 1, "confidence": 0.981}, "DueDate": {"type": "date", "valueDate": "2017-06-24", + "text": "6/24/2017", "boundingBox": [3.346, 3.41, 3.9514, 3.41, 3.9514, 3.5144, + 3.346, 3.5144], "page": 1, "confidence": 0.981}, "InvoiceDate": {"type": "date", + "valueDate": "2017-06-18", "text": "6/18/2017", "boundingBox": [1.9455, 3.41, + 2.551, 3.41, 2.551, 3.5144, 1.9455, 3.5144], "page": 1, "confidence": 0.968}, + "InvoiceId": {"type": "string", "valueString": "34278587", "text": "34278587", + "boundingBox": [0.5397, 3.411, 1.1457, 3.411, 1.1457, 3.5144, 0.5397, 3.5144], + "page": 1, "confidence": 0.973}, "InvoiceTotal": {"type": "number", "valueNumber": + 56651.49, "text": "$56,651.49", "boundingBox": [5.3871, 3.4047, 6.0702, 3.4047, + 6.0702, 3.5321, 5.3871, 3.5321], "page": 1, "confidence": 0.307}, "Items": + {"type": "array", "valueArray": [{"type": "object", "valueObject": {"Amount": + {"type": "number", "valueNumber": 56651.49, "text": "$56,651.49", "boundingBox": + [5.3871, 3.4047, 6.0702, 3.4047, 6.0702, 3.5321, 5.3871, 3.5321], "page": + 1, "confidence": 0.782}, "Date": {"type": "date", "valueDate": "2017-06-18", + "text": "6/18/2017", "boundingBox": [1.9455, 3.41, 2.551, 3.41, 2.551, 3.5144, + 1.9455, 3.5144], "page": 1, "confidence": 0.287}, "ProductCode": {"type": + "string", "valueString": "34278587", "text": "34278587", "boundingBox": [0.5397, + 3.411, 1.1457, 3.411, 1.1457, 3.5144, 0.5397, 3.5144], "page": 1, "confidence": + 0.657}, "Tax": {"type": "number", "text": "PT", "boundingBox": [6.2285, 3.4114, + 6.3919, 3.4114, 6.3919, 3.5119, 6.2285, 3.5119], "page": 1, "confidence": + 0.691}}, "text": "34278587 6/18/2017 6/24/2017 $56,651.49 PT", "boundingBox": + [0.5397, 3.4047, 6.3919, 3.4047, 6.3919, 3.5321, 0.5397, 3.5321], "page": + 1, "confidence": 0.855}]}, "VendorAddress": {"type": "string", "valueString": + "1 Redmond way Suite 6000 Redmond, WA 99243", "text": "1 Redmond way Suite + 6000 Redmond, WA 99243", "boundingBox": [0.8019, 1.7033, 2.1445, 1.7033, 2.1445, + 2.1911, 0.8019, 2.1911], "page": 1, "confidence": 0.953}, "VendorName": {"type": + "string", "valueString": "Contoso", "text": "Contoso", "boundingBox": [0.5384, + 1.1583, 1.4466, 1.1583, 1.4466, 1.3534, 0.5384, 1.3534], "page": 1, "confidence": + 0.981}}}]}}' + headers: + apim-request-id: 369c83ff-f338-4e28-ad4c-f18017ac7467 + content-length: '4392' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 18:05:52 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '91' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/invoice/analyzeResults/884301f8-271e-4e49-9171-a6cad2b7cc5f +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_receipt.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_receipt.test_pages_kwarg_specified.yaml new file mode 100644 index 000000000000..2b1b5086e049 --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_receipt.test_pages_kwarg_specified.yaml @@ -0,0 +1,115 @@ +interactions: +- request: + body: '!!! The request body has been omitted from the recording because its size + 154512 is larger than 128KB. !!!' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '154512' + Content-Type: + - image/jpeg + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/receipt/analyze?includeTextDetails=false&pages=1 + response: + body: + string: '' + headers: + apim-request-id: + - b8851b6a-189b-4abe-8d37-fa9261a9d4f3 + content-length: + - '0' + date: + - Thu, 11 Mar 2021 18:08:21 GMT + operation-location: + - https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/receipt/analyzeResults/b8851b6a-189b-4abe-8d37-fa9261a9d4f3 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '142' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/receipt/analyzeResults/b8851b6a-189b-4abe-8d37-fa9261a9d4f3 + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-03-11T18:08:21Z", + "lastUpdatedDateTime": "2021-03-11T18:08:24Z", "analyzeResult": {"version": + "2.1.0", "readResults": [{"page": 1, "angle": 0.1273, "width": 1688, "height": + 3000, "unit": "pixel"}], "documentResults": [{"docType": "prebuilt:receipt", + "pageRange": [1, 1], "fields": {"Items": {"type": "array", "valueArray": [{"type": + "object", "valueObject": {"Name": {"type": "string", "valueString": "Cappuccino", + "text": "Cappuccino", "boundingBox": [304, 1585, 658, 1598, 657, 1688, 302, + 1679], "page": 1, "confidence": 0.558}, "Quantity": {"type": "number", "valueNumber": + 1, "text": "1", "boundingBox": [244, 1581, 286, 1584, 283, 1678, 241, 1675], + "page": 1, "confidence": 0.936}, "TotalPrice": {"type": "number", "valueNumber": + 2.2, "text": "$2.20", "boundingBox": [1106, 1579, 1260, 1574, 1263, 1656, + 1108, 1662], "page": 1, "confidence": 0.972}}}, {"type": "object", "valueObject": + {"Name": {"type": "string", "valueString": "BACON & EGGS", "text": "BACON + & EGGS", "boundingBox": [293, 1839, 737, 1839, 737, 1924, 293, 1924], "page": + 1, "confidence": 0.906}, "Quantity": {"type": "number", "valueNumber": 1, + "text": "1", "boundingBox": [227, 1839, 275, 1839, 275, 1924, 226, 1924], + "page": 1, "confidence": 0.936}, "TotalPrice": {"type": "number", "valueNumber": + 9.5, "text": "$9.5", "boundingBox": [1134, 1948, 1252, 1948, 1252, 2041, 1134, + 2041], "page": 1, "confidence": 0.977}}}]}, "MerchantAddress": {"type": "string", + "valueString": "123 Main Street Redmond, WA 98052", "text": "123 Main Street + Redmond, WA 98052", "boundingBox": [298.6, 675.8, 844.8, 782.2, 810.6, 957.9, + 264.4, 851.5], "page": 1, "confidence": 0.974}, "MerchantName": {"type": "string", + "valueString": "Contoso", "text": "Contoso", "boundingBox": [308, 570, 515, + 627, 500, 685, 290, 634], "page": 1, "confidence": 0.974}, "MerchantPhoneNumber": + {"type": "phoneNumber", "valuePhoneNumber": "+19876543210", "text": "987-654-3210", + "boundingBox": [274, 1000, 651, 1049, 643, 1125, 268, 1076], "page": 1, "confidence": + 0.987}, "ReceiptType": {"type": "string", "valueString": "Itemized", "confidence": + 0.99}, "Subtotal": {"type": "number", "valueNumber": 11.7, "text": "$ 11.70", + "boundingBox": [1082, 2225.1, 1307.1, 2228, 1306, 2315.4, 1080.9, 2312.5], + "page": 1, "confidence": 0.967}, "Tax": {"type": "number", "valueNumber": + 1.17, "text": "$ 1.17", "boundingBox": [1125, 2352.1, 1307.4, 2361, 1303, + 2452.9, 1120.6, 2444], "page": 1, "confidence": 0.985}, "Tip": {"type": "number", + "valueNumber": 1.63, "text": "$ 1.63", "boundingBox": [1034, 2481.7, 1268.6, + 2488, 1266, 2583.5, 1031.5, 2577.2], "page": 1, "confidence": 0.941}, "Total": + {"type": "number", "valueNumber": 14.5, "text": "$14.50", "boundingBox": [1033, + 2623, 1374, 2641, 1368, 2757, 1027, 2740], "page": 1, "confidence": 0.978}, + "TransactionDate": {"type": "date", "valueDate": "2019-06-10", "text": "6/10/2019", + "boundingBox": [259, 1224, 514, 1247, 509, 1331, 255, 1312], "page": 1, "confidence": + 0.987}, "TransactionTime": {"type": "time", "valueTime": "13:59:00", "text": + "13:59", "boundingBox": [531, 1248, 681, 1262, 675, 1341, 526, 1333], "page": + 1, "confidence": 0.985}}}]}}' + headers: + apim-request-id: + - 20f7706e-07db-479d-aba7-7285c40400fb + content-length: + - '2836' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 18:08:26 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '19' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_receipt_async.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_receipt_async.test_pages_kwarg_specified.yaml new file mode 100644 index 000000000000..6d1cbd0c9d07 --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_receipt_async.test_pages_kwarg_specified.yaml @@ -0,0 +1,91 @@ +interactions: +- request: + body: '!!! The request body has been omitted from the recording because its size + 154512 is larger than 128KB. !!!' + headers: + Accept: + - application/json + Content-Type: + - image/jpeg + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/receipt/analyze?includeTextDetails=false&pages=1 + response: + body: + string: '' + headers: + apim-request-id: 712f8676-d247-4a4e-bef1-cadf026356bc + content-length: '0' + date: Thu, 11 Mar 2021 18:06:59 GMT + operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/receipt/analyzeResults/712f8676-d247-4a4e-bef1-cadf026356bc + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '184' + status: + code: 202 + message: Accepted + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/receipt/analyze?includeTextDetails=false&pages=1 +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/receipt/analyzeResults/712f8676-d247-4a4e-bef1-cadf026356bc + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-03-11T18:06:59Z", + "lastUpdatedDateTime": "2021-03-11T18:07:03Z", "analyzeResult": {"version": + "2.1.0", "readResults": [{"page": 1, "angle": 0.1273, "width": 1688, "height": + 3000, "unit": "pixel"}], "documentResults": [{"docType": "prebuilt:receipt", + "pageRange": [1, 1], "fields": {"Items": {"type": "array", "valueArray": [{"type": + "object", "valueObject": {"Name": {"type": "string", "valueString": "Cappuccino", + "text": "Cappuccino", "boundingBox": [304, 1585, 658, 1598, 657, 1688, 302, + 1679], "page": 1, "confidence": 0.558}, "Quantity": {"type": "number", "valueNumber": + 1, "text": "1", "boundingBox": [244, 1581, 286, 1584, 283, 1678, 241, 1675], + "page": 1, "confidence": 0.936}, "TotalPrice": {"type": "number", "valueNumber": + 2.2, "text": "$2.20", "boundingBox": [1106, 1579, 1260, 1574, 1263, 1656, + 1108, 1662], "page": 1, "confidence": 0.972}}}, {"type": "object", "valueObject": + {"Name": {"type": "string", "valueString": "BACON & EGGS", "text": "BACON + & EGGS", "boundingBox": [293, 1839, 737, 1839, 737, 1924, 293, 1924], "page": + 1, "confidence": 0.906}, "Quantity": {"type": "number", "valueNumber": 1, + "text": "1", "boundingBox": [227, 1839, 275, 1839, 275, 1924, 226, 1924], + "page": 1, "confidence": 0.936}, "TotalPrice": {"type": "number", "valueNumber": + 9.5, "text": "$9.5", "boundingBox": [1134, 1948, 1252, 1948, 1252, 2041, 1134, + 2041], "page": 1, "confidence": 0.977}}}]}, "MerchantAddress": {"type": "string", + "valueString": "123 Main Street Redmond, WA 98052", "text": "123 Main Street + Redmond, WA 98052", "boundingBox": [298.6, 675.8, 844.8, 782.2, 810.6, 957.9, + 264.4, 851.5], "page": 1, "confidence": 0.974}, "MerchantName": {"type": "string", + "valueString": "Contoso", "text": "Contoso", "boundingBox": [308, 570, 515, + 627, 500, 685, 290, 634], "page": 1, "confidence": 0.974}, "MerchantPhoneNumber": + {"type": "phoneNumber", "valuePhoneNumber": "+19876543210", "text": "987-654-3210", + "boundingBox": [274, 1000, 651, 1049, 643, 1125, 268, 1076], "page": 1, "confidence": + 0.987}, "ReceiptType": {"type": "string", "valueString": "Itemized", "confidence": + 0.99}, "Subtotal": {"type": "number", "valueNumber": 11.7, "text": "$ 11.70", + "boundingBox": [1082, 2225.1, 1307.1, 2228, 1306, 2315.4, 1080.9, 2312.5], + "page": 1, "confidence": 0.967}, "Tax": {"type": "number", "valueNumber": + 1.17, "text": "$ 1.17", "boundingBox": [1125, 2352.1, 1307.4, 2361, 1303, + 2452.9, 1120.6, 2444], "page": 1, "confidence": 0.985}, "Tip": {"type": "number", + "valueNumber": 1.63, "text": "$ 1.63", "boundingBox": [1034, 2481.7, 1268.6, + 2488, 1266, 2583.5, 1031.5, 2577.2], "page": 1, "confidence": 0.941}, "Total": + {"type": "number", "valueNumber": 14.5, "text": "$14.50", "boundingBox": [1033, + 2623, 1374, 2641, 1368, 2757, 1027, 2740], "page": 1, "confidence": 0.978}, + "TransactionDate": {"type": "date", "valueDate": "2019-06-10", "text": "6/10/2019", + "boundingBox": [259, 1224, 514, 1247, 509, 1331, 255, 1312], "page": 1, "confidence": + 0.987}, "TransactionTime": {"type": "time", "valueTime": "13:59:00", "text": + "13:59", "boundingBox": [531, 1248, 681, 1262, 675, 1341, 526, 1333], "page": + 1, "confidence": 0.985}}}]}}' + headers: + apim-request-id: c1383231-d6e8-421c-93a2-f779a8e03339 + content-length: '2836' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 18:07:05 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '16' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/receipt/analyzeResults/712f8676-d247-4a4e-bef1-cadf026356bc +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_receipt_from_url.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_receipt_from_url.test_pages_kwarg_specified.yaml new file mode 100644 index 000000000000..51e068780eef --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_receipt_from_url.test_pages_kwarg_specified.yaml @@ -0,0 +1,114 @@ +interactions: +- request: + body: 'b''{"source": "blob_sas_url"}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '233' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/receipt/analyze?includeTextDetails=false&pages=1 + response: + body: + string: '' + headers: + apim-request-id: + - 1e38fd38-1bdc-451e-9cc5-c9fefdddf89e + content-length: + - '0' + date: + - Thu, 11 Mar 2021 18:08:00 GMT + operation-location: + - https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/receipt/analyzeResults/1e38fd38-1bdc-451e-9cc5-c9fefdddf89e + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '263' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/receipt/analyzeResults/1e38fd38-1bdc-451e-9cc5-c9fefdddf89e + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-03-11T18:08:00Z", + "lastUpdatedDateTime": "2021-03-11T18:08:03Z", "analyzeResult": {"version": + "2.1.0", "readResults": [{"page": 1, "angle": 0.1273, "width": 1688, "height": + 3000, "unit": "pixel"}], "documentResults": [{"docType": "prebuilt:receipt", + "pageRange": [1, 1], "fields": {"Items": {"type": "array", "valueArray": [{"type": + "object", "valueObject": {"Name": {"type": "string", "valueString": "Cappuccino", + "text": "Cappuccino", "boundingBox": [304, 1585, 658, 1598, 657, 1688, 302, + 1679], "page": 1, "confidence": 0.558}, "Quantity": {"type": "number", "valueNumber": + 1, "text": "1", "boundingBox": [244, 1581, 286, 1584, 283, 1678, 241, 1675], + "page": 1, "confidence": 0.936}, "TotalPrice": {"type": "number", "valueNumber": + 2.2, "text": "$2.20", "boundingBox": [1106, 1579, 1260, 1574, 1263, 1656, + 1108, 1662], "page": 1, "confidence": 0.972}}}, {"type": "object", "valueObject": + {"Name": {"type": "string", "valueString": "BACON & EGGS", "text": "BACON + & EGGS", "boundingBox": [293, 1839, 737, 1839, 737, 1924, 293, 1924], "page": + 1, "confidence": 0.906}, "Quantity": {"type": "number", "valueNumber": 1, + "text": "1", "boundingBox": [227, 1839, 275, 1839, 275, 1924, 226, 1924], + "page": 1, "confidence": 0.936}, "TotalPrice": {"type": "number", "valueNumber": + 9.5, "text": "$9.5", "boundingBox": [1134, 1948, 1252, 1948, 1252, 2041, 1134, + 2041], "page": 1, "confidence": 0.977}}}]}, "MerchantAddress": {"type": "string", + "valueString": "123 Main Street Redmond, WA 98052", "text": "123 Main Street + Redmond, WA 98052", "boundingBox": [298.6, 675.8, 844.8, 782.2, 810.6, 957.9, + 264.4, 851.5], "page": 1, "confidence": 0.974}, "MerchantName": {"type": "string", + "valueString": "Contoso", "text": "Contoso", "boundingBox": [308, 570, 515, + 627, 500, 685, 290, 634], "page": 1, "confidence": 0.974}, "MerchantPhoneNumber": + {"type": "phoneNumber", "valuePhoneNumber": "+19876543210", "text": "987-654-3210", + "boundingBox": [274, 1000, 651, 1049, 643, 1125, 268, 1076], "page": 1, "confidence": + 0.987}, "ReceiptType": {"type": "string", "valueString": "Itemized", "confidence": + 0.99}, "Subtotal": {"type": "number", "valueNumber": 11.7, "text": "$ 11.70", + "boundingBox": [1082, 2225.1, 1307.1, 2228, 1306, 2315.4, 1080.9, 2312.5], + "page": 1, "confidence": 0.967}, "Tax": {"type": "number", "valueNumber": + 1.17, "text": "$ 1.17", "boundingBox": [1125, 2352.1, 1307.4, 2361, 1303, + 2452.9, 1120.6, 2444], "page": 1, "confidence": 0.985}, "Tip": {"type": "number", + "valueNumber": 1.63, "text": "$ 1.63", "boundingBox": [1034, 2481.7, 1268.6, + 2488, 1266, 2583.5, 1031.5, 2577.2], "page": 1, "confidence": 0.941}, "Total": + {"type": "number", "valueNumber": 14.5, "text": "$14.50", "boundingBox": [1033, + 2623, 1374, 2641, 1368, 2757, 1027, 2740], "page": 1, "confidence": 0.978}, + "TransactionDate": {"type": "date", "valueDate": "2019-06-10", "text": "6/10/2019", + "boundingBox": [259, 1224, 514, 1247, 509, 1331, 255, 1312], "page": 1, "confidence": + 0.987}, "TransactionTime": {"type": "time", "valueTime": "13:59:00", "text": + "13:59", "boundingBox": [531, 1248, 681, 1262, 675, 1341, 526, 1333], "page": + 1, "confidence": 0.985}}}]}}' + headers: + apim-request-id: + - 1b012703-9bf3-4ad3-a265-9db88b8d483a + content-length: + - '2836' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Mar 2021 18:08:06 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '20' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_receipt_from_url_async.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_receipt_from_url_async.test_pages_kwarg_specified.yaml new file mode 100644 index 000000000000..5a96245dc82b --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_receipt_from_url_async.test_pages_kwarg_specified.yaml @@ -0,0 +1,92 @@ +interactions: +- request: + body: 'b''{"source": "blob_sas_url"}''' + headers: + Accept: + - application/json + Content-Length: + - '233' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/receipt/analyze?includeTextDetails=false&pages=1 + response: + body: + string: '' + headers: + apim-request-id: 1335cb22-0547-45a0-be93-b49bd76d5cf6 + content-length: '0' + date: Thu, 11 Mar 2021 18:07:29 GMT + operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/receipt/analyzeResults/1335cb22-0547-45a0-be93-b49bd76d5cf6 + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '286' + status: + code: 202 + message: Accepted + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/receipt/analyze?includeTextDetails=false&pages=1 +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.1.0b4 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/receipt/analyzeResults/1335cb22-0547-45a0-be93-b49bd76d5cf6 + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-03-11T18:07:29Z", + "lastUpdatedDateTime": "2021-03-11T18:07:32Z", "analyzeResult": {"version": + "2.1.0", "readResults": [{"page": 1, "angle": 0.1273, "width": 1688, "height": + 3000, "unit": "pixel"}], "documentResults": [{"docType": "prebuilt:receipt", + "pageRange": [1, 1], "fields": {"Items": {"type": "array", "valueArray": [{"type": + "object", "valueObject": {"Name": {"type": "string", "valueString": "Cappuccino", + "text": "Cappuccino", "boundingBox": [304, 1585, 658, 1598, 657, 1688, 302, + 1679], "page": 1, "confidence": 0.558}, "Quantity": {"type": "number", "valueNumber": + 1, "text": "1", "boundingBox": [244, 1581, 286, 1584, 283, 1678, 241, 1675], + "page": 1, "confidence": 0.936}, "TotalPrice": {"type": "number", "valueNumber": + 2.2, "text": "$2.20", "boundingBox": [1106, 1579, 1260, 1574, 1263, 1656, + 1108, 1662], "page": 1, "confidence": 0.972}}}, {"type": "object", "valueObject": + {"Name": {"type": "string", "valueString": "BACON & EGGS", "text": "BACON + & EGGS", "boundingBox": [293, 1839, 737, 1839, 737, 1924, 293, 1924], "page": + 1, "confidence": 0.906}, "Quantity": {"type": "number", "valueNumber": 1, + "text": "1", "boundingBox": [227, 1839, 275, 1839, 275, 1924, 226, 1924], + "page": 1, "confidence": 0.936}, "TotalPrice": {"type": "number", "valueNumber": + 9.5, "text": "$9.5", "boundingBox": [1134, 1948, 1252, 1948, 1252, 2041, 1134, + 2041], "page": 1, "confidence": 0.977}}}]}, "MerchantAddress": {"type": "string", + "valueString": "123 Main Street Redmond, WA 98052", "text": "123 Main Street + Redmond, WA 98052", "boundingBox": [298.6, 675.8, 844.8, 782.2, 810.6, 957.9, + 264.4, 851.5], "page": 1, "confidence": 0.974}, "MerchantName": {"type": "string", + "valueString": "Contoso", "text": "Contoso", "boundingBox": [308, 570, 515, + 627, 500, 685, 290, 634], "page": 1, "confidence": 0.974}, "MerchantPhoneNumber": + {"type": "phoneNumber", "valuePhoneNumber": "+19876543210", "text": "987-654-3210", + "boundingBox": [274, 1000, 651, 1049, 643, 1125, 268, 1076], "page": 1, "confidence": + 0.987}, "ReceiptType": {"type": "string", "valueString": "Itemized", "confidence": + 0.99}, "Subtotal": {"type": "number", "valueNumber": 11.7, "text": "$ 11.70", + "boundingBox": [1082, 2225.1, 1307.1, 2228, 1306, 2315.4, 1080.9, 2312.5], + "page": 1, "confidence": 0.967}, "Tax": {"type": "number", "valueNumber": + 1.17, "text": "$ 1.17", "boundingBox": [1125, 2352.1, 1307.4, 2361, 1303, + 2452.9, 1120.6, 2444], "page": 1, "confidence": 0.985}, "Tip": {"type": "number", + "valueNumber": 1.63, "text": "$ 1.63", "boundingBox": [1034, 2481.7, 1268.6, + 2488, 1266, 2583.5, 1031.5, 2577.2], "page": 1, "confidence": 0.941}, "Total": + {"type": "number", "valueNumber": 14.5, "text": "$14.50", "boundingBox": [1033, + 2623, 1374, 2641, 1368, 2757, 1027, 2740], "page": 1, "confidence": 0.978}, + "TransactionDate": {"type": "date", "valueDate": "2019-06-10", "text": "6/10/2019", + "boundingBox": [259, 1224, 514, 1247, 509, 1331, 255, 1312], "page": 1, "confidence": + 0.987}, "TransactionTime": {"type": "time", "valueTime": "13:59:00", "text": + "13:59", "boundingBox": [531, 1248, 681, 1262, 675, 1341, 526, 1333], "page": + 1, "confidence": 0.985}}}]}}' + headers: + apim-request-id: 0f4137ec-213d-4c95-b0fa-ceb1dbbc0227 + content-length: '2836' + content-type: application/json; charset=utf-8 + date: Thu, 11 Mar 2021 18:07:34 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '21' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/v2.1-preview.3/prebuilt/receipt/analyzeResults/1335cb22-0547-45a0-be93-b49bd76d5cf6 +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_business_card.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_business_card.py index aa14dedb8077..adfd0fd4d712 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_business_card.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_business_card.py @@ -460,3 +460,13 @@ def test_business_card_locale_error(self, client): with pytest.raises(HttpResponseError) as e: client.begin_recognize_business_cards(business_card, locale="not a locale") assert "locale" in e.value.error.message + + @FormRecognizerPreparer() + @GlobalClientPreparer() + def test_pages_kwarg_specified(self, client): + with open(self.business_card_jpg, "rb") as fd: + business_card = fd.read() + poller = client.begin_recognize_business_cards(business_card, pages=["1"]) + assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + result = poller.result() + assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_business_card_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_business_card_async.py index c131f34081da..fcbae6f0720b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_business_card_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_business_card_async.py @@ -485,3 +485,14 @@ async def test_business_card_locale_error(self, client): async with client: await client.begin_recognize_business_cards(business_card, locale="not a locale") assert "locale" in e.value.error.message + + @FormRecognizerPreparer() + @GlobalClientPreparer() + async def test_pages_kwarg_specified(self, client): + with open(self.business_card_jpg, "rb") as fd: + business_card = fd.read() + async with client: + poller = await client.begin_recognize_business_cards(business_card, pages=["1"]) + assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + result = await poller.result() + assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_business_card_from_url.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_business_card_from_url.py index 02c5de22b888..9c5a38d5fce2 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_business_card_from_url.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_business_card_from_url.py @@ -372,3 +372,11 @@ def test_business_card_locale_error(self, client): with pytest.raises(HttpResponseError) as e: client.begin_recognize_business_cards_from_url(self.business_card_url_jpg, locale="not a locale") assert "locale" in e.value.error.message + + @FormRecognizerPreparer() + @GlobalClientPreparer() + def test_pages_kwarg_specified(self, client): + poller = client.begin_recognize_business_cards_from_url(self.business_card_url_jpg, pages=["1"]) + assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + result = poller.result() + assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_business_card_from_url_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_business_card_from_url_async.py index 1be2acce25dc..c135ce6694e6 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_business_card_from_url_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_business_card_from_url_async.py @@ -390,3 +390,12 @@ async def test_business_card_locale_error(self, client): async with client: await client.begin_recognize_business_cards_from_url(self.business_card_url_jpg, locale="not a locale") assert "locale" in e.value.error.message + + @FormRecognizerPreparer() + @GlobalClientPreparer() + async def test_pages_kwarg_specified(self, client): + async with client: + poller = await client.begin_recognize_business_cards_from_url(self.business_card_url_jpg, pages=["1"]) + assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + result = await poller.result() + assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content.py index 8b139aaee24e..43f021023e7f 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content.py @@ -383,3 +383,13 @@ def test_content_language_v2(self, client): with pytest.raises(ValueError) as e: client.begin_recognize_content(myfile, language="en") assert "'language' is only available for API version V2_1_PREVIEW and up" in str(e.value) + + @FormRecognizerPreparer() + @GlobalClientPreparer() + def test_pages_kwarg_specified(self, client): + with open(self.form_jpg, "rb") as fd: + myfile = fd.read() + poller = client.begin_recognize_content(myfile, pages=["1"]) + assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + result = poller.result() + assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content_async.py index e39ceebfea7c..4f1107193202 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content_async.py @@ -422,3 +422,14 @@ async def test_content_language_v2(self, client): with pytest.raises(ValueError) as e: await client.begin_recognize_content(myfile, language="en") assert "'language' is only available for API version V2_1_PREVIEW and up" in str(e.value) + + @FormRecognizerPreparer() + @GlobalClientPreparer() + async def test_pages_kwarg_specified(self, client): + with open(self.form_jpg, "rb") as fd: + myfile = fd.read() + async with client: + poller = await client.begin_recognize_content(myfile, pages=["1"]) + assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + result = await poller.result() + assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content_from_url.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content_from_url.py index 93b778be6c7e..d83b4843cac4 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content_from_url.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content_from_url.py @@ -353,3 +353,12 @@ def test_content_language_spanish(self, client, formrecognizer_testing_data_cont layout = result[0] self.assertEqual(layout.page_number, 1) self.assertFormPagesHasValues(result) + + @FormRecognizerPreparer() + @GlobalClientPreparer() + def test_pages_kwarg_specified(self, client, formrecognizer_testing_data_container_sas_url): + blob_sas_url = self.get_blob_url(formrecognizer_testing_data_container_sas_url, "testingdata", "content_spanish.pdf") + poller = client.begin_recognize_content_from_url(blob_sas_url, pages=["1"]) + assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + result = poller.result() + assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content_from_url_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content_from_url_async.py index d7bf30968ec7..42519a3f6159 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content_from_url_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content_from_url_async.py @@ -386,3 +386,13 @@ async def test_content_language_spanish(self, client, formrecognizer_testing_dat layout = result[0] self.assertEqual(layout.page_number, 1) self.assertFormPagesHasValues(result) + + @FormRecognizerPreparer() + @GlobalClientPreparer() + async def test_pages_kwarg_specified(self, client, formrecognizer_testing_data_container_sas_url): + blob_sas_url = self.get_blob_url(formrecognizer_testing_data_container_sas_url, "testingdata", "content_spanish.pdf") + async with client: + poller = await client.begin_recognize_content_from_url(blob_sas_url, pages=["1"]) + assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + result = await poller.result() + assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms.py index ef83039c8b9e..f0c8534861e9 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms.py @@ -505,4 +505,20 @@ def callback(raw_response, _, headers): page_results = actual.analyze_result.page_results actual_fields = actual.analyze_result.document_results[0].fields - self.assertFormPagesTransformCorrect(recognized_form[0].pages, read_results, page_results) \ No newline at end of file + self.assertFormPagesTransformCorrect(recognized_form[0].pages, read_results, page_results) + + @FormRecognizerPreparer() + @GlobalClientPreparer() + def test_pages_kwarg_specified(self, client, formrecognizer_storage_container_sas_url): + fr_client = client.get_form_recognizer_client() + + with open(self.form_jpg, "rb") as fd: + myfile = fd.read() + + training_poller = client.begin_training(formrecognizer_storage_container_sas_url, use_training_labels=False) + model = training_poller.result() + + poller = fr_client.begin_recognize_custom_forms(model.model_id, myfile, pages=["1"]) + assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + result = poller.result() + assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_async.py index 0ef70355449c..95f93b7160a0 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_async.py @@ -545,3 +545,21 @@ def callback(raw_response, _, headers): actual_fields = actual.analyze_result.document_results[0].fields self.assertFormPagesTransformCorrect(recognized_form[0].pages, read_results, page_results) + + @FormRecognizerPreparer() + @GlobalClientPreparer() + async def test_pages_kwarg_specified(self, client, formrecognizer_storage_container_sas_url): + fr_client = client.get_form_recognizer_client() + + with open(self.form_jpg, "rb") as fd: + myfile = fd.read() + + async with client: + training_poller = await client.begin_training(formrecognizer_storage_container_sas_url, use_training_labels=False) + model = await training_poller.result() + + async with fr_client: + poller = await fr_client.begin_recognize_custom_forms(model.model_id, myfile, pages=["1"]) + assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + result = await poller.result() + assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url.py index 5ad0c70f451b..92f1eb069701 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url.py @@ -439,3 +439,17 @@ def callback(raw_response, _, headers): actual_fields = actual.analyze_result.document_results[0].fields self.assertFormPagesTransformCorrect(recognized_form[0].pages, read_results, page_results) + + @FormRecognizerPreparer() + @GlobalClientPreparer() + def test_pages_kwarg_specified(self, client, formrecognizer_storage_container_sas_url): + fr_client = client.get_form_recognizer_client() + blob_sas_url = self.get_blob_url(formrecognizer_storage_container_sas_url, "testingdata", "multi1.pdf") + + training_poller = client.begin_training(formrecognizer_storage_container_sas_url, use_training_labels=False) + model = training_poller.result() + + poller = fr_client.begin_recognize_custom_forms_from_url(model.model_id, blob_sas_url, pages=["1"]) + assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + result = poller.result() + assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url_async.py index 5efadeacc907..e21196136bdf 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url_async.py @@ -477,3 +477,22 @@ def callback(raw_response, _, headers): actual_fields = actual.analyze_result.document_results[0].fields self.assertFormPagesTransformCorrect(recognized_form[0].pages, read_results, page_results) + + @FormRecognizerPreparer() + @GlobalClientPreparer() + async def test_pages_kwarg_specified(self, client, formrecognizer_storage_container_sas_url): + fr_client = client.get_form_recognizer_client() + blob_sas_url = self.get_blob_url(formrecognizer_storage_container_sas_url, "testingdata", "multi1.pdf") + + async with fr_client: + training_poller = await client.begin_training(formrecognizer_storage_container_sas_url, use_training_labels=False) + model = await training_poller.result() + + poller = await fr_client.begin_recognize_custom_forms_from_url( + model.model_id, + blob_sas_url, + pages=["1"]) + + assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + result = await poller.result() + assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_id_documents.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_id_documents.py index 64a0657b554f..d1f47a51c8db 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_id_documents.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_id_documents.py @@ -230,3 +230,13 @@ def test_id_document_v2(self, client): with pytest.raises(ValueError) as e: client.begin_recognize_id_documents(id_document) assert "Method 'begin_recognize_id_documents' is only available for API version V2_1_PREVIEW and up" in str(e.value) + + @FormRecognizerPreparer() + @GlobalClientPreparer() + def test_pages_kwarg_specified(self, client): + with open(self.id_document_jpg, "rb") as fd: + id_document = fd.read() + poller = client.begin_recognize_id_documents(id_document, pages=["1"]) + assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + result = poller.result() + assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_id_documents_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_id_documents_async.py index 7ade9a87883c..8cf8912f7586 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_id_documents_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_id_documents_async.py @@ -248,3 +248,14 @@ async def test_id_document_v2(self, client): async with client: await client.begin_recognize_id_documents(id_document) assert "Method 'begin_recognize_id_documents' is only available for API version V2_1_PREVIEW and up" in str(e.value) + + @FormRecognizerPreparer() + @GlobalClientPreparer() + async def test_pages_kwarg_specified(self, client): + with open(self.id_document_jpg, "rb") as fd: + id_document = fd.read() + async with client: + poller = await client.begin_recognize_id_documents(id_document, pages=["1"]) + assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + result = await poller.result() + assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_id_documents_from_url.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_id_documents_from_url.py index de9d5c19548b..c95e5b3e4f84 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_id_documents_from_url.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_id_documents_from_url.py @@ -156,3 +156,11 @@ def test_id_document_v2(self, client): with pytest.raises(ValueError) as e: client.begin_recognize_id_documents_from_url(self.id_document_url_jpg) assert "Method 'begin_recognize_id_documents_from_url' is only available for API version V2_1_PREVIEW and up" in str(e.value) + + @FormRecognizerPreparer() + @GlobalClientPreparer() + def test_pages_kwarg_specified(self, client): + poller = client.begin_recognize_id_documents_from_url(self.id_document_url_jpg, pages=["1"]) + assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + result = poller.result() + assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_id_documents_from_url_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_id_documents_from_url_async.py index 848fe49f8fe6..f32ee3ef239d 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_id_documents_from_url_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_id_documents_from_url_async.py @@ -168,3 +168,12 @@ async def test_id_document_v2(self, client): async with client: await client.begin_recognize_id_documents_from_url(self.id_document_url_jpg) assert "Method 'begin_recognize_id_documents_from_url' is only available for API version V2_1_PREVIEW and up" in str(e.value) + + @FormRecognizerPreparer() + @GlobalClientPreparer() + async def test_pages_kwarg_specified(self, client): + async with client: + poller = await client.begin_recognize_id_documents_from_url(self.id_document_url_jpg, pages=["1"]) + assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + result = await poller.result() + assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice.py index 0190cb227baf..7d7182663071 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice.py @@ -382,3 +382,14 @@ def test_invoice_locale_error(self, client): with pytest.raises(HttpResponseError) as e: client.begin_recognize_invoices(invoice, locale="not a locale") assert "locale" in e.value.error.message + + @FormRecognizerPreparer() + @GlobalClientPreparer() + def test_pages_kwarg_specified(self, client): + with open(self.invoice_pdf, "rb") as fd: + invoice = fd.read() + + poller = client.begin_recognize_invoices(invoice, pages=["1"]) + assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + result = poller.result() + assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice_async.py index cdc30a8473e8..1483addc0fc7 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice_async.py @@ -409,3 +409,14 @@ async def test_invoice_locale_error(self, client): async with client: await client.begin_recognize_invoices(invoice, locale="not a locale") assert "locale" in e.value.error.message + + @FormRecognizerPreparer() + @GlobalClientPreparer() + async def test_pages_kwarg_specified(self, client): + with open(self.invoice_pdf, "rb") as fd: + invoice = fd.read() + async with client: + poller = await client.begin_recognize_invoices(invoice, pages=["1"]) + assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + result = await poller.result() + assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice_from_url.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice_from_url.py index 0b078d864fc0..1a1a17e76eca 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice_from_url.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice_from_url.py @@ -294,3 +294,11 @@ def test_invoice_locale_error(self, client): with pytest.raises(HttpResponseError) as e: client.begin_recognize_invoices_from_url(self.invoice_url_pdf, locale="not a locale") assert "locale" in e.value.error.message + + @FormRecognizerPreparer() + @GlobalClientPreparer() + def test_pages_kwarg_specified(self, client): + poller = client.begin_recognize_invoices_from_url(self.invoice_url_pdf, pages=["1"]) + assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + result = poller.result() + assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice_from_url_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice_from_url_async.py index 03ddac308b56..4e3e2aa4a8f9 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice_from_url_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_invoice_from_url_async.py @@ -313,3 +313,12 @@ async def test_invoice_locale_error(self, client): async with client: await client.begin_recognize_invoices_from_url(self.invoice_url_pdf, locale="not a locale") assert "locale" in e.value.error.message + + @FormRecognizerPreparer() + @GlobalClientPreparer() + async def test_pages_kwarg_specified(self, client): + async with client: + poller = await client.begin_recognize_invoices_from_url(self.invoice_url_pdf, pages=["1"]) + assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + result = await poller.result() + assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt.py index 68c2d28d131c..ed2ad5053be9 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt.py @@ -400,3 +400,14 @@ def test_receipt_locale_v2(self, client): with pytest.raises(ValueError) as e: client.begin_recognize_receipts(receipt, locale="en-US") assert "'locale' is only available for API version V2_1_PREVIEW and up" in str(e.value) + + @FormRecognizerPreparer() + @GlobalClientPreparer() + def test_pages_kwarg_specified(self, client): + with open(self.receipt_jpg, "rb") as fd: + receipt = fd.read() + + poller = client.begin_recognize_receipts(receipt, pages=["1"]) + assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + result = poller.result() + assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt_async.py index 30c0a5f2524e..2230394643c2 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt_async.py @@ -432,3 +432,14 @@ async def test_receipt_locale_v2(self, client): async with client: await client.begin_recognize_receipts(receipt, locale="en-US") assert "'locale' is only available for API version V2_1_PREVIEW and up" in str(e.value) + + @FormRecognizerPreparer() + @GlobalClientPreparer() + async def test_pages_kwarg_specified(self, client): + with open(self.receipt_jpg, "rb") as fd: + receipt = fd.read() + async with client: + poller = await client.begin_recognize_receipts(receipt, pages=["1"]) + assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + result = await poller.result() + assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt_from_url.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt_from_url.py index 47052c921050..24bf6f84547a 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt_from_url.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt_from_url.py @@ -326,3 +326,11 @@ def test_receipt_locale_v2(self, client): with pytest.raises(ValueError) as e: client.begin_recognize_receipts_from_url(self.receipt_url_jpg, locale="en-US") assert "'locale' is only available for API version V2_1_PREVIEW and up" in str(e.value) + + @FormRecognizerPreparer() + @GlobalClientPreparer() + def test_pages_kwarg_specified(self, client): + poller = client.begin_recognize_receipts_from_url(self.receipt_url_jpg, pages=["1"]) + assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + result = poller.result() + assert result diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt_from_url_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt_from_url_async.py index cdfa91cdebed..a5612eeb5d54 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt_from_url_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt_from_url_async.py @@ -364,3 +364,12 @@ async def test_receipt_locale_v2(self, client): async with client: await client.begin_recognize_receipts_from_url(self.receipt_url_jpg, locale="en-US") assert "'locale' is only available for API version V2_1_PREVIEW and up" in str(e.value) + + @FormRecognizerPreparer() + @GlobalClientPreparer() + async def test_pages_kwarg_specified(self, client): + async with client: + poller = await client.begin_recognize_receipts_from_url(self.receipt_url_jpg, pages=["1"]) + assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] + result = await poller.result() + assert result