Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/clientV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ interface ValidatedPollingOptions extends PollingOptions {
*
* @property modelId Identifier of the model that must process the document. **Required**.
* @property rag When `true`, activates Retrieval-Augmented Generation (RAG).
* @property polygon When `true`, activates location data on compatible plans.
* @property confidence When `true`, activates confidence scores on compatible plans.
* @property rawText When `true`, retrieves the text data on compatible plans.
* @property alias Custom alias assigned to the uploaded document.
* @property webhookIds List of webhook UUIDs that will receive the final API response.
* @property pollingOptions Client-side polling configuration (see {@link PollingOptions}).
Expand All @@ -76,17 +79,24 @@ interface ValidatedPollingOptions extends PollingOptions {
* const params = {
* modelId: "YOUR_MODEL_ID",
* rag: true,
* polygon: true,
* confidence: true,
* rawText: true,
* alias: "YOUR_ALIAS",
* webhookIds: ["YOUR_WEBHOOK_ID_1", "YOUR_WEBHOOK_ID_2"],
* pollingOptions: {
* initialDelaySec: 2,
* delaySec: 1.5,
* }
* },
* closeFile: false,
* };
*/
export interface InferenceParameters {
modelId: string;
rag?: boolean;
polygon?: boolean;
confidence?: boolean;
rawText?: boolean;
alias?: string;
webhookIds?: string[];
pollingOptions?: PollingOptions;
Expand Down
9 changes: 9 additions & 0 deletions src/http/mindeeApiV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,15 @@ export class MindeeApiV2 {
if (params.rag) {
form.append("rag", "true");
}
if (params.polygon) {
form.append("polygon", "true");
}
if (params.confidence) {
form.append("confidence", "true");
}
if (params.rawText) {
form.append("raw_text", "true");
}
if (params.webhookIds && params.webhookIds.length > 0) {
form.append("webhook_ids", params.webhookIds.join(","));
}
Expand Down
Loading