Skip to content
Merged
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
31 changes: 0 additions & 31 deletions docs/code_samples/workflow_execution.txt

This file was deleted.

60 changes: 0 additions & 60 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 0 additions & 31 deletions src/v1/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@ import {
Inference,
PredictResponse,
StringDict,
WorkflowResponse,
} from "./parsing/common/index.js";
Comment thread
ianardee marked this conversation as resolved.
Resolved
import { InferenceFactory } from "./parsing/common/inference.js";
import { GeneratedV1 } from "./product/index.js";
import { WorkflowEndpoint } from "./http/index.js";

/**
* Common options for workflows and predictions.
Expand Down Expand Up @@ -276,34 +273,6 @@ export class Client {
return new AsyncPredictResponse<T>(productClass, docResponse.data);
}

/**
* Send the document to an asynchronous endpoint and return its ID in the queue.
* @param inputSource file to send to the API.
* @param workflowId ID of the workflow.
* @param params parameters relating to prediction options.
* @category Workflow
* @returns a `Promise` containing the job (queue) corresponding to a document.
*/
async executeWorkflow(
inputSource: InputSource,
workflowId: string,
params: WorkflowOptions = {}
): Promise<WorkflowResponse<GeneratedV1>> {
const workflowEndpoint = new WorkflowEndpoint(this.apiSettings, workflowId);
if (inputSource === undefined) {
throw new Error("The 'executeWorkflow' function requires an input document.");
}
const rawResponse = await workflowEndpoint.executeWorkflow({
inputDoc: inputSource,
alias: params.alias,
priority: params.priority,
pageOptions: params?.pageOptions,
fullText: this.getBooleanParam(params.fullText),
});

return new WorkflowResponse<GeneratedV1>(GeneratedV1, rawResponse.data);
}

/**
Comment thread
ianardee marked this conversation as resolved.
Resolved
Comment thread
ianardee marked this conversation as resolved.
Resolved
* Fetch prediction results from a document already processed.
*
Expand Down
1 change: 0 additions & 1 deletion src/v1/http/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ export {
MindeeHttp504Error,
handleError,
} from "./errors.js";
export { WorkflowEndpoint } from "./workflowEndpoint.js";
export type { PredictParams, WorkflowParams } from "./httpParams.js";
Loading
Loading