mindee
    Preparing search index...

    Class Client

    Mindee Client V2 class that centralizes most basic operations.

    Index
    • Parameters

      • options: ClientOptions = ...

        options for the initialization of a client.

      Returns Client

    mindeeApi: MindeeApiV2

    Mindee V2 API handler.

    • Deletes a document from the RAG database.

      Type Parameters

      • P extends typeof BaseProduct

      Parameters

      • product: P

        the product the RAG database belongs to.

      • documentId: string

        the document's ID.

      Returns Promise<boolean>

    • Enqueues a product inference job without waiting for completion.

      Type Parameters

      • P extends typeof BaseProduct

      Parameters

      • product: P
      • inputSource: InputSource
      • params:
            | InstanceType<P["parametersClass"]>
            | ConstructorParameters<P["parametersClass"]>[0]

      Returns Promise<JobResponse>

    • Enqueue a request and poll the server until the result is sent or until the maximum number of tries is reached.

      Type Parameters

      • P extends typeof BaseProduct

      Parameters

      • product: P

        the product to retrieve.

      • inputSource: InputSource

        file or URL to parse.

      • params:
            | InstanceType<P["parametersClass"]>
            | ConstructorParameters<P["parametersClass"]>[0]

        parameters relating to prediction options.

      • OptionalpollingOptions: PollingOptionsConstructor | PollingOptions

        options for the polling loop, see PollingOptions.

      Returns Promise<InstanceType<P["responseClass"]>>

      a Promise containing parsing results.

    • Get the processing status of a previously enqueued request. Can be used for polling.

      Parameters

      • jobId: string

        id of the queue to poll.

      Returns Promise<JobResponse>

      a Promise containing a Job, which also contains a Document if the parsing is complete.

    • Not recommended for general use, prefer getReadyRagDocumentPoll. You will need to poll until the document is ready for use. Get a document's info and annotations from the RAG database.

      Type Parameters

      • P extends typeof BaseProduct

      Parameters

      • product: P

        the product the RAG database belongs to.

      • documentId: string

        the document's ID.

      Returns Promise<InstanceType<P["annotationResponseClass"]>>

    • Get a document's info and annotations from the RAG database.

      Type Parameters

      • P extends typeof BaseProduct

      Parameters

      • product: P

        the product the RAG database belongs to.

      • documentId: string

        the document's ID.

      • OptionalpollingOptions: PollingOptionsConstructor | PollingOptions

        options for the polling loop, see PollingOptions.

      Returns Promise<InstanceType<P["annotationResponseClass"]>>

      a Promise containing the RAG document annotation.

    • Retrieves the result of a previously enqueued request.

      Type Parameters

      • P extends typeof BaseProduct

      Parameters

      • product: P

        the product to retrieve.

      • inferenceId: string

        id of the queue to poll.

      Returns Promise<InstanceType<P["responseClass"]>>

      a Promise containing the inference.

    • Retrieves the result of a previously enqueued request. This method is used when manually polling the server for the result URL.

      Type Parameters

      • P extends typeof BaseProduct

      Parameters

      • product: P

        the product to retrieve.

      • url: string

        URL as given in the getJob() response.

      Returns Promise<InstanceType<P["responseClass"]>>

      a Promise containing the inference.

    • Protected

      Poll until the document is finished processing or the max number of attempts is reached.

      Type Parameters

      • P extends typeof BaseProduct

      Parameters

      • product: P

        The product the RAG database belongs to.

      • initialResponse: InstanceType<P["annotationResponseClass"]>

        The initial response containing the document's ID.

      • pollingOptions: PollingOptions

        Options for the polling loop, see PollingOptions.

      Returns Promise<InstanceType<P["annotationResponseClass"]>>

      A Promise containing the RAG document annotation.

    • Protected

      Send a document to an endpoint and poll the server until the result is sent or until the maximum number of tries is reached.

      Type Parameters

      • P extends typeof BaseProduct

      Parameters

      Returns Promise<InstanceType<P["responseClass"]>>

    • Search for resources matching the given criteria.

      Type Parameters

      • S extends typeof BaseSearch

      Parameters

      • search: S

        Search definition class to use.

      • searchParameters:
            | InstanceType<S["parametersClass"]>
            | ConstructorParameters<S["parametersClass"]>[0]

        Search parameters.

      Returns Promise<InstanceType<S["responseClass"]>>

      a Promise containing the search response with the matching resources.

    • Search for models available to the account.

      Parameters

      • Optionalname: string

        Optional name filter.

      • OptionalmodelType: string

        Optional model type filter.

      Returns Promise<SearchResponse>

      a Promise containing the search response.

      Use search(ModelSearch, {}) instead.

    • Update a document's annotations in the RAG database and poll until ready.

      Type Parameters

      • P extends typeof BaseProduct

      Parameters

      • product: P

        The product the RAG database belongs to.

      • parameters:
            | InstanceType<P["annotationParametersClass"]>
            | ConstructorParameters<P["annotationParametersClass"]>[0]

        The parameters to use for the update.

      • OptionalpollingOptions: PollingOptionsConstructor | PollingOptions

        options for the polling loop, see PollingOptions.

      Returns Promise<InstanceType<P["annotationResponseClass"]>>

      a Promise containing the RAG document annotation.

    • Not recommended for general use, prefer updateAndGetRagAnnotationPoll. You will need to poll until the document is ready for use. Update a document's annotations in the RAG database.

      Type Parameters

      • P extends typeof BaseProduct

      Parameters

      • product: P

        The product the RAG database belongs to.

      • parameters:
            | InstanceType<P["annotationParametersClass"]>
            | ConstructorParameters<P["annotationParametersClass"]>[0]

        The parameters to use for the update.

      Returns Promise<InstanceType<P["annotationResponseClass"]>>

    • Add a document to the RAG database and return the initial annotation.

      Type Parameters

      • P extends typeof BaseProduct

      Parameters

      • product: P

        The product the RAG database belongs to.

      • inputSource: LocalInputSource

        The file to upload.

      • parameters:
            | InstanceType<P["ragDocumentUploadClass"]>
            | ConstructorParameters<P["ragDocumentUploadClass"]>[0]

        The parameters to use for the upload.

      • OptionalpollingOptions: PollingOptionsConstructor | PollingOptions

        options for the polling loop, see PollingOptions.

      Returns Promise<InstanceType<P["annotationResponseClass"]>>

    • Not recommended for general use, prefer uploadAndGetRagDocumentPoll. You will need to poll until the document is ready for use. Add a document to the RAG database.

      Type Parameters

      • P extends typeof BaseProduct

      Parameters

      • product: P

        The product the RAG database belongs to.

      • inputSource: LocalInputSource

        The file to upload.

      • parameters:
            | InstanceType<P["ragDocumentUploadClass"]>
            | ConstructorParameters<P["ragDocumentUploadClass"]>[0]

        The parameters to use for the upload.

      Returns Promise<InstanceType<P["annotationResponseClass"]>>