Skip to main content

clarifai-nodejs / Exports / Workflow

Class: Workflow

Hierarchy

  • Lister

    Workflow

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Workflow(«destructured»): Workflow

Parameters

NameType
«destructured»WorkflowConfig

Returns

Workflow

Overrides

Lister.constructor

Defined in

client/workflow.ts:53

Properties

id

Private id: string

Defined in

client/workflow.ts:50


outputConfig

Private outputConfig: OutputConfig

Defined in

client/workflow.ts:51


versionId

Private versionId: string

Defined in

client/workflow.ts:49

Methods

exportWorkflow

exportWorkflow(outPath): Promise<void>

Exports the workflow to a yaml file.

Parameters

NameTypeDescription
outPathstringThe path to save the yaml file to.

Returns

Promise<void>

Example

import { Workflow } from "./workflow";

const workflow = new Workflow("https://clarifai.com/clarifai/main/workflows/Demographics");
await workflow.export("out_path.yml");

Defined in

client/workflow.ts:256


listVersions

listVersions(«destructured»): AsyncGenerator<AsObject, void, void>

Parameters

NameType
«destructured»Object
› pageNo?number
› perPage?number

Returns

AsyncGenerator<AsObject, void, void>

Defined in

client/workflow.ts:214


predict

predict(«destructured»): Promise<AsObject>

Parameters

NameType
«destructured»Object
› inputsInput[]
› workflowStateId?string

Returns

Promise<AsObject>

Defined in

client/workflow.ts:82


predictByBytes

predictByBytes(inputBytes, inputType): Promise<AsObject>

Parameters

NameType
inputBytesBuffer
inputType"image" | "text" | "video" | "audio"

Returns

Promise<AsObject>

Defined in

client/workflow.ts:153


predictByUrl

predictByUrl(url, inputType): Promise<AsObject>

Parameters

NameType
urlstring
inputType"image" | "text" | "video" | "audio"

Returns

Promise<AsObject>

Defined in

client/workflow.ts:192