Documentation
¶
Overview ¶
Package pipeline provides a way to chain multiple llm executions.
Index ¶
- Constants
- Variables
- func NewSplitter(llm Llm, splitterFn SplitterFn) *splitter
- func SetNextTube(output types.M, nextTube int) types.M
- func SetNextTubeExit(output types.M) types.M
- type Decoder
- type Llm
- type LlmEngine
- type LlmMode
- type Memory
- type Pipe
- type Pipeline
- type PipelineCallback
- type Prompt
- type SplitterFn
- type Tube
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 ¶
func NewSplitter ¶ added in v0.0.3
func NewSplitter( llm Llm, splitterFn SplitterFn, ) *splitter
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 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
Click to show internal directories.
Click to hide internal directories.