Documentation
¶
Index ¶
- type Executor
- type Option
- func WithHooks(hooks llm.Hooks) Option
- func WithMaxIterations(maxIterations int) Option
- func WithMemory(m llm.Memory) Option
- func WithOutputKey(outputKey string) Option
- func WithParserErrorHandler(errorHandler *llm.ParserErrorHandler) Option
- func WithPromptFormatInstructions(formatInstructions string) Option
- func WithPromptPrefix(promptPrefix string) Option
- func WithPromptSuffix(suffix string) Option
- func WithReturnIntermediateSteps() Option
- func WithTemplate(template llm.Template) Option
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor is the chain responsible for running agents.
func NewExecutor ¶
NewExecutor creates a new agent executor with an agent and the tools the agent can use.
func (*Executor) AgentHooks ¶
func (e *Executor) AgentHooks() llm.AgentHooks
func (*Executor) InputKeys ¶
GetInputKeys gets the input keys the agent of the executor expects. Often "input".
func (*Executor) OutputKeys ¶
OutputKeys gets the output keys the agent of the executor returns.
type Option ¶
type Option func(*Options)
Option is a function type that can be used to modify the creation of the agents and executors.
func WithMaxIterations ¶
WithMaxIterations is an option for setting the max number of iterations the executor will complete.
func WithMemory ¶
WithMemory is an option for setting the memory of the executor.
func WithOutputKey ¶
WithOutputKey is an option for setting the output key of the agent.
func WithParserErrorHandler ¶
func WithParserErrorHandler(errorHandler *llm.ParserErrorHandler) Option
WithParserErrorHandler is an option for setting a parser error handler to an executor.
func WithPromptFormatInstructions ¶
WithPromptFormatInstructions is an option for setting the format instructions of the prompt used by the agent.
func WithPromptPrefix ¶
WithPromptPrefix is an option for setting the prefix of the prompt used by the agent.
func WithPromptSuffix ¶
WithPromptSuffix is an option for setting the suffix of the prompt used by the agent.
func WithReturnIntermediateSteps ¶
func WithReturnIntermediateSteps() Option
WithReturnIntermediateSteps is an option for making the executor return the intermediate steps taken.
func WithTemplate ¶
WithTemplate is an option for setting the prompt template the agent will use.