Form Recognizer Rest API - v2.1 Preview Query

kushala gajengi 21 Reputation points
2020-09-24T09:21:22.13+00:00

I m using Form Recognizer Rest API - v2.1 Preview & have below queries.

1) Azure Container : Currently I add format wise invoice files in folders of Azure container & then train the model by passing container file path in Rest API.
Is there any way to add these training files on our local premises instead of Azure container, Is there any Rest API to integrate the container file management so the files can be stored & managed from our application & server itself.

2) Compose API not working : Trying to use "https://{endpoint}/formrecognizer/v2.1-preview.1/custom/models/compose" by passing header Content-Type & Ocp-Apim-Subscription-Key values.
But Request body parameter is not working, What needs to passed for Request body?

Please provide the details.

Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
1,430 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. romungi-MSFT 42,756 Reputation points Microsoft Employee
    2020-09-24T10:32:26.08+00:00

    @kushala gajengi The train API allows local files to be used for training. Currently, there is no documented example of this but it is pretty much similar to using the blob container but the path to the file should conform to unix/linux absolute path.

    For example, after you setup your container using the steps in this document configure the required keys to your FR endpoint and after you validate the running container open the swagger URI http://localhost:5000/swagger locally you can use the train API with local files i.e for a configuration setting value of '/input' use a valid source path something like '/input/contosodataset'. All data to be trained is expected to be under the source folder or sub folders under it. Models are trained using documents that are of the following content type - 'application/pdf', 'image/jpeg', 'image/png', 'image/tiff'. Ref: API Documentation.

    To use compose with REST API follow the steps in this thread or use the following in the body of the request.

     {  
         "description": "Request contract for compose operation.",  
         "modelIds": ["model_guid","model_guid"],  
         "modelName": "Rohit123"  
     }  
    

    We hope the above response is useful. Please accept the same as answer if it helped you proceed further.