Class BaseSingleActionAgentAbstract

Abstract base class for single action agents in LangChain. Extends the BaseAgent class and provides additional functionality specific to single action agents.

Hierarchy

Constructors

Properties

ToolType: StructuredToolInterface

Accessors

Methods

  • Decide what to do, given some input.

    Parameters

    • steps: AgentStep[]

      Steps the LLM has taken so far, along with observations from each.

    • inputs: ChainValues

      User inputs.

    • Optional callbackManager: any

      Callback manager.

    Returns Promise<any>

    Action specifying what tool to use.

  • Prepare the agent for output, if needed

    Parameters

    • _returnValues: AgentFinish
    • _steps: AgentStep[]

    Returns Promise<AgentFinish>

  • Return response when agent has been stopped due to max iterations

    Parameters

    • earlyStoppingMethod: StoppingMethod
    • _steps: AgentStep[]
    • _inputs: ChainValues
    • Optional _callbackManager: any

    Returns Promise<AgentFinish>

Generated using TypeDoc