Documentation
¶
Overview ¶
Package workflow provides composable building blocks for multi-step AI pipelines.
A Step is any function that transforms a string input into a string output. Steps compose via Chain (sequential), Parallel (concurrent), and Conditional.
result, err := workflow.Chain(ctx, userInput,
llmSummarize,
llmTranslate,
workflow.Transform(strings.ToUpper),
)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Chain ¶
Chain runs steps sequentially, passing each output as the next step's input. Returns the output of the final step, or the first error encountered.
Types ¶
type Step ¶
Step transforms a string input and returns a string output. It is the basic unit of a workflow pipeline.
func Conditional ¶
Conditional returns a Step that calls thenStep when condition(input) is true, or elseStep otherwise. Pass nil for elseStep to pass input through unchanged.
Click to show internal directories.
Click to hide internal directories.