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 ¶ added in v0.0.6
func (p *Pipeline) WithPostCallbacks(callbacks ...PipelineCallback) *Pipeline
func (*Pipeline) WithPreCallbacks ¶ added in v0.0.6
func (p *Pipeline) WithPreCallbacks(callbacks ...PipelineCallback) *Pipeline
type PipelineCallback ¶ added in v0.0.6
type Splitter ¶ added in v0.0.3
type Splitter struct {
// contains filtered or unexported fields
}
func NewSplitter ¶ added in v0.0.3
func NewSplitter( llm Llm, splitterFn SplitterFn, ) *Splitter
func (*Splitter) WithDecoder ¶ added in v0.0.9
type Tube ¶ added in v0.0.3
type Tube struct {
// contains filtered or unexported fields
}
func (*Tube) Run ¶ added in v0.0.3
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 ¶ added in v0.0.5
func (*Tube) WithHistory ¶ added in v0.0.9
Click to show internal directories.
Click to hide internal directories.