UNPKG

mindee

Version:

Mindee Client Library for Node.js

22 lines (21 loc) 947 B
import { DataSchemaActiveOption } from "./dataSchemaActiveOption.js"; export class ExtractionActiveOptions { constructor(serverResponse) { this.rag = serverResponse["rag"]; this.rawText = serverResponse["raw_text"]; this.polygon = serverResponse["polygon"]; this.confidence = serverResponse["confidence"]; this.textContext = serverResponse["text_context"]; this.dataSchema = new DataSchemaActiveOption(serverResponse["data_schema"]); } toString() { return "Active Options\n" + "==============\n" + `:Raw Text: ${this.rawText ? "True" : "False"}\n` + `:Polygon: ${this.polygon ? "True" : "False"}\n` + `:Confidence: ${this.confidence ? "True" : "False"}\n` + `:RAG: ${this.rag ? "True" : "False"}\n` + `:Text Context: ${this.textContext ? "True" : "False"}\n\n` + `${this.dataSchema}\n`; } }