Agent that interoperates with Structured Tools using React logic.

⚠️ Deprecated ⚠️

Use the createStructuredChatAgent method instead.

This feature is deprecated and will be removed in the future.

It is not recommended for use.

Hierarchy

  • Agent
    • StructuredChatAgent

Constructors

Properties

ToolType: StructuredToolInterface
llmChain: LLMChain<string, any>
outputParser: undefined | AgentActionOutputParser

Accessors

Methods

  • Constructs the agent's scratchpad from a list of steps. If the agent's scratchpad is not empty, it prepends a message indicating that the agent has not seen any previous work.

    Parameters

    • steps: AgentStep[]

      Array of AgentStep instances to construct the scratchpad from.

    Returns Promise<string>

    A Promise that resolves to a string representing the agent's scratchpad.

  • 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 to use for this call.

    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>

  • Creates a string representation of the schemas of the provided tools.

    Parameters

    • tools: StructuredToolInterface[]

      Array of StructuredTool instances to create the schemas string from.

    Returns string

    A string representing the schemas of the provided tools.

Generated using TypeDoc