UiPath Documentation
document-understanding
latest
false
Document Understanding API ガイド
重要 :
このコンテンツの一部は機械翻訳によって処理されており、完全な翻訳を保証するものではありません。 新しいコンテンツの翻訳は、およそ 1 ~ 2 週間で公開されます。

生成 AI 抽出器

プロジェクト ID とサンプルの curl POST 要求を使用して、Document Understanding API 経由で生成 AI 抽出器を実行します。

生成抽出器を使用してドキュメントからのフィールドの抽出を開始する

ヒント:

プロジェクト ID は、プロジェクトの情報の取得呼び出しから受け取った応答から取得します。

curl -X 'POST' \
  '{AutomationCloudURL}/<Organization_Name>/<Tenant_Name>/du_/api/framework/projects/<Project_ID>/extractors/generative_extractor/extraction?api-version=1' \
  -H 'accept: text/plain' \
  -H 'Authorization: Bearer <your-access-token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "documentId": "fa83da2a-1498-ee11-8925-000d3a67a01e",
  "prompts": [
    {
       "id": "Invoice Number",
       "question": "Extract the invoice number from the provided document."
    },
    {
       "id": "Date",
       "question": "What is the invoice date mentioned in the document?"
    },
    {
       "id": "Total",
       "question": "Extract the total amount from the invoice."
    }
  ]
}'
curl -X 'POST' \
  '{AutomationCloudURL}/<Organization_Name>/<Tenant_Name>/du_/api/framework/projects/<Project_ID>/extractors/generative_extractor/extraction?api-version=1' \
  -H 'accept: text/plain' \
  -H 'Authorization: Bearer <your-access-token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "documentId": "fa83da2a-1498-ee11-8925-000d3a67a01e",
  "prompts": [
    {
       "id": "Invoice Number",
       "question": "Extract the invoice number from the provided document."
    },
    {
       "id": "Date",
       "question": "What is the invoice date mentioned in the document?"
    },
    {
       "id": "Total",
       "question": "Extract the total amount from the invoice."
    }
  ]
}'

生成抽出器を使用したドキュメントからのフィールドの抽出の応答

{
    "extractionResult": {
        "DocumentId": "fa83da2a-1498-ee11-8925-000d3a67a01e",
        "ResultsVersion": 0,
        "ResultsDocument": {
            "Bounds": {
                "StartPage": 0,
                "PageCount": 1,
                "TextStartIndex": 0,
                "TextLength": 864
            },
            "Language": "eng",
            "DocumentGroup": "",
            "DocumentCategory": "",
            "DocumentTypeId": "Unknown",
            "DocumentTypeName": "Unknown",
            "DocumentTypeDataVersion": 0,
            "DataVersion": 0,
            "DocumentTypeSource": "Automatic",
            "DocumentTypeField": {
                "Components": [],
                "Value": "Unknown",
                "UnformattedValue": "",
                "Reference": {
                    "TextStartIndex": 0,
                    "TextLength": 0,
                    "Tokens": []
                },
                "DerivedFields": [],
                "Confidence": 1.0,
                "OperatorConfirmed": false,
                "OcrConfidence": -1.0,
                "TextType": "Unknown"
            },
            "Fields": [
                {
                    "FieldId": "Invoice Number",
                    "FieldName": "Invoice Number",
                    "FieldType": "Text",
                    "IsMissing": false,
                    "DataSource": "Automatic",
                    "Values": [
                        {
                            "Components": [],
                            "Value": "INV-3337",
                            "UnformattedValue": "",
                            "Reference": {
                                "TextStartIndex": 69,
                                "TextLength": 8,
                                "Tokens": [
                                    {
                                        "TextStartIndex": 69,
                                        "TextLength": 8,
                                        "Page": 0,
                                        "PageWidth": 595.0,
                                        "PageHeight": 841.0,
                                        "Boxes": [
                                            [
                                                115.73,
                                                451.94,
                                                37.17,
                                                14.11
                                            ]
                                        ]
                                    }
                                ]
                            },
                            "DerivedFields": [],
                            "Confidence": 0.0,
                            "OperatorConfirmed": false,
                            "OcrConfidence": 1.0,
                            "TextType": "Unknown"
                        }
                    ],
                    "DataVersion": 0,
                    "OperatorConfirmed": false
                },
                {
                    "FieldId": "Date",
                    "FieldName": "Date",
                    "FieldType": "Text",
                    "IsMissing": false,
                    "DataSource": "Automatic",
                    "Values": [
                        {
                            "Components": [],
                            "Value": "January 25, 2016",
                            "UnformattedValue": "",
                            "Reference": {
                                "TextStartIndex": 191,
                                "TextLength": 16,
                                "Tokens": [
                                    {
                                        "TextStartIndex": 191,
                                        "TextLength": 16,
                                        "Page": 0,
                                        "PageWidth": 595.0,
                                        "PageHeight": 841.0,
                                        "Boxes": [
                                            [
                                                147.35,
                                                451.94,
                                                31.3,
                                                14.11
                                            ],
                                            [
                                                147.35,
                                                485.68,
                                                12.23,
                                                14.11
                                            ],
                                            [
                                                147.35,
                                                500.36,
                                                19.57,
                                                14.11
                                            ]
                                        ]
                                    }
                                ]
                            },
                            "DerivedFields": [],
                            "Confidence": 0.0,
                            "OperatorConfirmed": false,
                            "OcrConfidence": 1.0,
                            "TextType": "Unknown"
                        }
                    ],
                    "DataVersion": 0,
                    "OperatorConfirmed": false
                },
                {
                    "FieldId": "Total",
                    "FieldName": "Total",
                    "FieldType": "Text",
                    "IsMissing": false,
                    "DataSource": "Automatic",
                    "Values": [
                        {
                            "Components": [],
                            "Value": "$93.50",
                            "UnformattedValue": "",
                            "Reference": {
                                "TextStartIndex": 374,
                                "TextLength": 6,
                                "Tokens": [
                                    {
                                        "TextStartIndex": 374,
                                        "TextLength": 6,
                                        "Page": 0,
                                        "PageWidth": 595.0,
                                        "PageHeight": 841.0,
                                        "Boxes": [
                                            [
                                                178.76,
                                                451.94,
                                                26.91,
                                                14.43
                                            ]
                                        ]
                                    }
                                ]
                            },
                            "DerivedFields": [],
                            "Confidence": 0.0,
                            "OperatorConfirmed": false,
                            "OcrConfidence": 1.0,
                            "TextType": "Unknown"
                        }
                    ],
                    "DataVersion": 0,
                    "OperatorConfirmed": false
                }
            ],
            "Tables": []
        },
        "ExtractorPayloads": null,
        "BusinessRulesResults": null
    }
}
{
    "extractionResult": {
        "DocumentId": "fa83da2a-1498-ee11-8925-000d3a67a01e",
        "ResultsVersion": 0,
        "ResultsDocument": {
            "Bounds": {
                "StartPage": 0,
                "PageCount": 1,
                "TextStartIndex": 0,
                "TextLength": 864
            },
            "Language": "eng",
            "DocumentGroup": "",
            "DocumentCategory": "",
            "DocumentTypeId": "Unknown",
            "DocumentTypeName": "Unknown",
            "DocumentTypeDataVersion": 0,
            "DataVersion": 0,
            "DocumentTypeSource": "Automatic",
            "DocumentTypeField": {
                "Components": [],
                "Value": "Unknown",
                "UnformattedValue": "",
                "Reference": {
                    "TextStartIndex": 0,
                    "TextLength": 0,
                    "Tokens": []
                },
                "DerivedFields": [],
                "Confidence": 1.0,
                "OperatorConfirmed": false,
                "OcrConfidence": -1.0,
                "TextType": "Unknown"
            },
            "Fields": [
                {
                    "FieldId": "Invoice Number",
                    "FieldName": "Invoice Number",
                    "FieldType": "Text",
                    "IsMissing": false,
                    "DataSource": "Automatic",
                    "Values": [
                        {
                            "Components": [],
                            "Value": "INV-3337",
                            "UnformattedValue": "",
                            "Reference": {
                                "TextStartIndex": 69,
                                "TextLength": 8,
                                "Tokens": [
                                    {
                                        "TextStartIndex": 69,
                                        "TextLength": 8,
                                        "Page": 0,
                                        "PageWidth": 595.0,
                                        "PageHeight": 841.0,
                                        "Boxes": [
                                            [
                                                115.73,
                                                451.94,
                                                37.17,
                                                14.11
                                            ]
                                        ]
                                    }
                                ]
                            },
                            "DerivedFields": [],
                            "Confidence": 0.0,
                            "OperatorConfirmed": false,
                            "OcrConfidence": 1.0,
                            "TextType": "Unknown"
                        }
                    ],
                    "DataVersion": 0,
                    "OperatorConfirmed": false
                },
                {
                    "FieldId": "Date",
                    "FieldName": "Date",
                    "FieldType": "Text",
                    "IsMissing": false,
                    "DataSource": "Automatic",
                    "Values": [
                        {
                            "Components": [],
                            "Value": "January 25, 2016",
                            "UnformattedValue": "",
                            "Reference": {
                                "TextStartIndex": 191,
                                "TextLength": 16,
                                "Tokens": [
                                    {
                                        "TextStartIndex": 191,
                                        "TextLength": 16,
                                        "Page": 0,
                                        "PageWidth": 595.0,
                                        "PageHeight": 841.0,
                                        "Boxes": [
                                            [
                                                147.35,
                                                451.94,
                                                31.3,
                                                14.11
                                            ],
                                            [
                                                147.35,
                                                485.68,
                                                12.23,
                                                14.11
                                            ],
                                            [
                                                147.35,
                                                500.36,
                                                19.57,
                                                14.11
                                            ]
                                        ]
                                    }
                                ]
                            },
                            "DerivedFields": [],
                            "Confidence": 0.0,
                            "OperatorConfirmed": false,
                            "OcrConfidence": 1.0,
                            "TextType": "Unknown"
                        }
                    ],
                    "DataVersion": 0,
                    "OperatorConfirmed": false
                },
                {
                    "FieldId": "Total",
                    "FieldName": "Total",
                    "FieldType": "Text",
                    "IsMissing": false,
                    "DataSource": "Automatic",
                    "Values": [
                        {
                            "Components": [],
                            "Value": "$93.50",
                            "UnformattedValue": "",
                            "Reference": {
                                "TextStartIndex": 374,
                                "TextLength": 6,
                                "Tokens": [
                                    {
                                        "TextStartIndex": 374,
                                        "TextLength": 6,
                                        "Page": 0,
                                        "PageWidth": 595.0,
                                        "PageHeight": 841.0,
                                        "Boxes": [
                                            [
                                                178.76,
                                                451.94,
                                                26.91,
                                                14.43
                                            ]
                                        ]
                                    }
                                ]
                            },
                            "DerivedFields": [],
                            "Confidence": 0.0,
                            "OperatorConfirmed": false,
                            "OcrConfidence": 1.0,
                            "TextType": "Unknown"
                        }
                    ],
                    "DataVersion": 0,
                    "OperatorConfirmed": false
                }
            ],
            "Tables": []
        },
        "ExtractorPayloads": null,
        "BusinessRulesResults": null
    }
}

このページは役に立ちましたか?

接続

ヘルプ リソース サポート

学習する UiPath アカデミー

質問する UiPath フォーラム

最新情報を取得