Skip to main content
Version: v1.0

Pipeline

A custom pipeline that can be created on the aiXplain Platform.

Declaration​

final class Pipeline

Overview​

The Pipeline class represents a custom pipeline on the aiXplain Platform. It provides functionality to run the pipeline and handle its execution.

Usage​

  1. Initialize a Pipeline object with the necessary parameters.
  2. Call the run(_:id:parameters:) method to execute the pipeline.

Example​

let pipeline = PipelineFactory.get("PipelineID")
let input = "Hello World"
do {
let output = try await pipeline.run(input)
// Handle pipeline output
} catch {
// Handle errors
}

Topics​

Initializers​

init(from: Decoder) throws

Initializes a pipeline object from decoder.

Instance Properties​

var description: String

var id: String

The unique identifier of the pipeline.

let inputNodes: [PipelineNode]

An array of input nodes in the pipeline.

let outputNodes: [PipelineNode]

An array of output nodes in the pipeline.

Instance Methods​

func run(PipelineInput, id: String, parameters: PipelineRunParameters) async throws -> PipelineOutput

Runs the pipeline with the provided input.