Documentation
¶
Overview ¶
Package pipeline provides a way to chain multiple llm executions.
Index ¶
Constants ¶
View Source
const ( NextTubeKey = "next_tube" NextTubeExit = -1 )
Variables ¶
View Source
var ( ErrDecoding = errors.New("decoding input error") ErrInvalidLmmMode = errors.New("invalid LLM mode") ErrLLMExecution = errors.New("llm execution error") )
View Source
var (
ErrSplitFunction = fmt.Errorf("split function error")
)
Functions ¶
Types ¶
type Pipeline ¶
type Pipeline struct {
// contains filtered or unexported fields
}
func (*Pipeline) WithPostCallbacks ¶
func (*Pipeline) WithPreCallbacks ¶
type Splitter ¶
type Splitter struct {
// contains filtered or unexported fields
}
func NewSplitter ¶
func NewSplitter( llm Llm, splitterFn SplitterFn, ) *Splitter
func (*Splitter) WithDecoder ¶
type Tube ¶
type Tube struct {
// contains filtered or unexported fields
}
func (*Tube) Run ¶
Run execute the step and return the output. The prompt is formatted with the input and the output of the prompt is used as input for the LLM. If the step has a memory, the output is stored in the memory.
func (*Tube) WithDecoder ¶
func (*Tube) WithHistory ¶
Click to show internal directories.
Click to hide internal directories.