As IntelliDocs continues to evolve, we recognize the need to enhance how results are presented. To maintain backward compatibility, we have introduced the concept of Output Schemas. This allows you to choose the schema that best fits your implementation needs.

In the Document Stream window, you can select your preferred Output Schema from the available options.

The currently available Output Schemas are:

Version 1:

[  
    {  
        fields*: {  
            <*>: {  
                key*: string;  
                value*: string | integer;  
            };  
        };  
        ocr*: string;  
        recognizedPages*: integer;  
        tables: [  
            [  
                [list of string]  
            ]  
        ];  
        usage: {  
            completion_tokens_: number;  
            prompt_token_: number;  
            total_tokens_: number;  
        }  
    };  
];

Example:

[
  {
    "fields": {
      "invoiceNumber": {
        "key": "Invoice number",
        "value": "INV-001"
      },
      "invoiceTotal": {
        "key": "Invoice total",
        "value": 200
      },
      "invoiceDate": {
        "key": "Invoice date",
        "value": "2017-06-01"
      },
      "currency": {
        "key": "Currency",
        "value": "USD"
      },
      "customerName": {
        "key": "Customer name",
        "value": "Demo User"
      },
      "purchaseOrder": {
        "key": "Purchase order",
        "value": "000000"
      },
      "dueDate": {
        "key": "Due date",
        "value": "2017-07-01"
      },
      "subtotal": {
        "key": "Subtotal",
        "value": 200
      },
      "taxes": {
        "key": "Taxes",
        "value": 0
      }
    },
    "tables": [
      [
        [
          "Description",
          "Quantity",
          "Unit price",
          "Line total",
          "Product"
        ],
        [
          "Grass Cutting",
          40,
          5,
          200,
          "Grass Cutting"
        ]
      ]
    ],
    "ocr": "Evergreen...",
    "usage": {
      "prompt_tokens": 1629,
      "completion_tokens": 96,
      "total_tokens": 1725
    },
    "recognizedPages": 1
  }
]

Version 2:

{
    outputVersion: 'V2';
    fields: {
        <*>: string | number | [{
            <*>: string | number;
        }];
    };
    ocr*: string | [string];
    recognizedPages*: number;
    usage: {
        completionTokens*: number;
        promptToken*: number;
        totalTokens*: number;
    };
}

Example:

{
  "outputVersion": "v2",
  "fields": {
    "Invoice number": "INV-001",
    "Invoice total": 200,
    "Invoice date": "2017-06-01",
    "Item list": [
      {
        "Description": "Grass Cutting",
        "Quantity": 40,
        "Unit price": 5,
        "Line total": 200,
        "Product": "Grass Cutting"
      }
    ],
    "Currency": "USD",
    "Customer name": "Demo User",
    "Purchase order": "000000",
    "Due date": "2017-07-01",
    "Subtotal": 200,
    "Taxes": 0
  },
  "ocr": "Evergreen…",
  "usage": {
    "completionTokens": 96,
    "promptTokens": 1629,
    "totalTokens": 1725
  },
  "recognizedPages": 1
}