clarifai-nodejs / Exports / Workflow
Class: Workflow
Hierarchy
-
Lister
↳
Workflow
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new Workflow(«destructured»
): Workflow
Parameters
Name | Type |
---|---|
«destructured» | WorkflowConfig |
Returns
Overrides
Lister.constructor
Defined in
Properties
id
• Private
id: string
Defined in
outputConfig
• Private
outputConfig: OutputConfig
Defined in
versionId
• Private
versionId: string
Defined in
Methods
exportWorkflow
▸ exportWorkflow(outPath
): Promise
<void
>
Exports the workflow to a yaml file.
Parameters
Name | Type | Description |
---|---|---|
outPath | string | The 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
listVersions
▸ listVersions(«destructured»
): AsyncGenerator
<AsObject
, void
, void
>
Parameters
Name | Type |
---|---|
«destructured» | Object |
› pageNo? | number |
› perPage? | number |
Returns
AsyncGenerator
<AsObject
, void
, void
>
Defined in
predict
▸ predict(«destructured»
): Promise
<AsObject
>
Parameters
Name | Type |
---|---|
«destructured» | Object |
› inputs | Input [] |
› workflowStateId? | string |
Returns
Promise
<AsObject
>
Defined in
predictByBytes
▸ predictByBytes(inputBytes
, inputType
): Promise
<AsObject
>
Parameters
Name | Type |
---|---|
inputBytes | Buffer |
inputType | "image" | "text" | "video" | "audio" |
Returns
Promise
<AsObject
>
Defined in
predictByUrl
▸ predictByUrl(url
, inputType
): Promise
<AsObject
>
Parameters
Name | Type |
---|---|
url | string |
inputType | "image" | "text" | "video" | "audio" |
Returns
Promise
<AsObject
>