Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GenerateCompletionStep ¶
type GenerateCompletionStep struct {
// contains filtered or unexported fields
}
GenerateCompletionStep is a pipeline step that calls an LLM client to generate a completion.
func NewGenerateCompletionStep ¶
func NewGenerateCompletionStep(client core.Client, inputKey, outputKey, model string) *GenerateCompletionStep
NewGenerateCompletionStep creates a new step to invoke an LLM. - client: The core.Client to use (e.g., openai.Client). - inputKey: The state key to read the user prompt from (expects string). - outputKey: The state key to write the string response to. - model: The model name to use.
func (*GenerateCompletionStep) Name ¶
func (s *GenerateCompletionStep) Name() string
Name returns the step's name.
func (*GenerateCompletionStep) WithSystemPrompt ¶
func (s *GenerateCompletionStep) WithSystemPrompt(sysPrompt string) *GenerateCompletionStep
WithSystemPrompt sets an optional system prompt for this step.
type TemplateStep ¶
type TemplateStep struct {
// contains filtered or unexported fields
}
TemplateStep is a pipeline step that renders a text template using data from the state.
func NewTemplateStep ¶
func NewTemplateStep(templateStr, outputKey string, inputKeys ...string) *TemplateStep
NewTemplateStep creates a step that renders a template. - templateStr: The Go text/template string. - outputKey: The state key to write the rendered string to. - inputKeys: Keys from the state to pass into the template as variables.