mindee
Version:
Mindee Client Library for Node.js
61 lines (60 loc) • 1.89 kB
TypeScript
import { FormData } from "undici";
import { StringDict } from "../../../../parsing/stringDict.js";
import { DataSchema } from "./dataSchema.js";
import { BaseParameters, BaseParametersConstructor } from "../../../../v2/clientOptions/baseParameters.js";
/**
* Parameters accepted by the asynchronous **inference** v2 endpoint.
*
* All fields are optional except `modelId`.
*
* @category ClientV2
* @example
* const params = {
* modelId: "YOUR_MODEL_ID",
* rag: true,
* alias: "YOUR_ALIAS",
* webhookIds: ["YOUR_WEBHOOK_ID_1", "YOUR_WEBHOOK_ID_2"],
* pollingOptions: {
* initialDelaySec: 2,
* delaySec: 1.5,
* }
* };
*/
export declare class ExtractionParameters extends BaseParameters {
/**
* Use Retrieval-Augmented Generation during inference.
*/
rag?: boolean;
/**
* Extract the entire text from the document as strings, and fill the `rawText` attribute.
*/
rawText?: boolean;
/**
* Calculate bounding box polygons for values, and fill the `locations` attribute of fields.
*/
polygon?: boolean;
/**
* Calculate confidence scores for values, and fill the `confidence` attribute of fields.
* Useful for automation.
*/
confidence?: boolean;
/**
* Additional text context used by the model during inference.
* *Not recommended*, for specific use only.
*/
textContext?: string;
/**
* Dynamic changes to the data schema of the model for this inference.
* Not recommended, for specific use only.
*/
dataSchema?: DataSchema | StringDict | string;
constructor(params: BaseParametersConstructor & {
rag?: boolean;
rawText?: boolean;
polygon?: boolean;
confidence?: boolean;
textContext?: string;
dataSchema?: DataSchema | StringDict | string;
});
getFormData(): FormData;
}