Vue normale

Il y a de nouveaux articles disponibles, cliquez pour rafraîchir la page.
À partir d’avant-hierFlux principal

AI Builder – Document Processing Limitation and Work around

We faced an issue while running the Predict or Extract Information from Document and using a custom AI Model, we have defined the fields on our Model 495 fields and then we finished Tagging and Publish our Model , so far we got no warnings or clues that when we put our model into action it will not work.

We started our Power Automate flow .. and just trying to save it we get the below error:

Exact error message:

Request to XRM API failed with server error: 'Message: Flow server error returned with status code "InternalServerError" and details "{"error":{"code":"DynamicSchemaResponseTooLarge","message":"The dynamic schema response from API 'commondataserviceforapps' operation 'GetPredictionSchema' is too large, only schemas with at most '1024' properties are supported."}}". Code: 0x80097376 InnerError: '. The tracking Id is 'a7efeb3c-50aa-44b2-8f95-4037ebc2eb5a'.

So we learned that currently the AI Builder connector has a limitations of 300 fields per AI Custom Model, I could not find these Limitations stated anywhere in the Microsoft documentations.

Solution as shared by Joe Fernandez and special thanks to him for sharing this solution with us, I am listing the steps below as well:

  1. Add the Perform a bound action from the Dataverse connector.

2. Put the following information on each field of the action.
Table name: AI Models
Action Name: Predict
Row id: The model id. (You can get the model id form the URL in the Model Details Page in the Power
Apps portal.

For example: https://make.powerapps.com/environment/223537a6-254b-4fe5-910c0fbd4e36a65d/aibuilder/models/e61cd551-8b1d-4757-9a99-80c3defe59ad.

In Bold will be the model id to use.
Version: 1.0
Request:
For a .jpeg image of the form:
{
“base64Encoded”: “EXPRESSION”,
“mimeType”: “image/jpeg”
}
For a .pdf document of the form:
{
“base64Encoded”: “EXPRESSION”,
“mimeType”: “application/pdf”
}
In the case of a manual trigger, replace EXPRESSION with the following expression: string(triggerBody()?[‘file’]?[‘contentBytes’])
Depending on which connector the file comes from, the expression will need to be enclosed by base64() instead of string(), so in short this should be a base64 string

3. Select Test on the upper right, select I’ll perform the trigger action, and then select Save & Test.

4. Select a document that can be processed by your trained form processing model and then select Run flow.

5. Go to the flow run history and copy the results from PredictResponse response, if your predict response is very big then you will not be able to get the predict response unless you add it to a compose data operation as below.

6. Go to the flow run history and copy the output from the compose data operation by clicking the Download output, it will open in browser, Copy and paste in notepad and replace the backslash \ with empty value.

You can use a tool like Code Beautify to fix any json issues you have. Thanks to Suga for pointing it out to me.

7. Go back to edit the flow editor. Select + New step, search for Parse JSON, and then select Parse JSON– Data Operations from the list of actions.

8.In the Parse JSON action, next to Content, select PredictResponse response from the Dynamic
content pane.

8.Click on Generate from sample and paste what you copied on step 6, and then select Done.

9.Now you can use the output of the form processing model in subsequent actions in Power Automate.

Note. All fields will be displayed with the name “value” on the dynamic content pane. To put a more
explanatory name, modify the JSON schema that was generated from the Parse JSON step. Put a title
attribute like seen in the following screenshot for each field.

Sauvegardez en quelques clics vos données sur une Clé USB (logiciel indispensable)

Merci à vous de suivre le flux Rss de www.sospc.name. ;o)<

Vous avez quelques données importantes éparpillées sur votre PC et vous aimeriez les sauvegarder facilement.  Le logiciel que je vous propose et conseille permet de copier vos photos, vidéos, fichiers audio et vos documents sur une clé USB (ou un support externe) en quelques clics seulement. Il est utilisable à partir de Windows 7 et […]

Cet article Sauvegardez en quelques clics vos données sur une Clé USB (logiciel indispensable) est apparu en premier sur votre site préféré www.sospc.name ;o)<

❌
❌