langchain.js
    Preparing search index...

    Use ToolNode instead.

    Hierarchy

    • RunnableBinding<ToolExecutorInputType, ToolExecutorOutputType>
      • ToolExecutor
    Index

    Constructors

    • Parameters

      Returns ToolExecutor

    Properties

    invalidToolMsgTemplate: string
    lc_graph_name: string = "ToolExecutor"
    toolMap: Record<string, StructuredToolInterface | RunnableToolLike>
    tools: (
        | StructuredToolInterface<ToolInputSchemaBase, any, any>
        | RunnableToolLike<InteropZodType, unknown>
    )[]

    Methods

    • Execute a tool invocation

      Parameters

      • toolInvocation: ToolInvocationInterface

        The tool to invoke and the input to pass to it.

      • Optionalconfig: RunnableConfig<Record<string, any>>

        Optional configuration to pass to the tool when invoked.

      Returns Promise<any>

      Either the result of the tool invocation (string or ToolMessage, set by the ToolOutput generic) or a string error message.