Interface StructuredToolInterface<T>

Base interface implemented by all runnables. Used for cross-compatibility between different versions of LangChain core.

Should not change on patch releases.

Type Parameters

  • T extends z.ZodObject<any, any, any, any> = z.ZodObject<any, any, any, any>

Hierarchy

Properties

description: string
name: string
returnDirect: boolean
schema: T | ZodEffects<T, output<T>, input<T>>

Methods

  • Calls the tool with the provided argument, configuration, and tags. It parses the input according to the schema, handles any errors, and manages callbacks.

    Parameters

    • arg: input<T> | (output<T> extends string
          ? string
          : never)

      The input argument for the tool.

    • Optional configArg: Callbacks | RunnableConfig

      Optional configuration or callbacks for the tool.

    • Optional tags: string[]

      Optional tags for the tool.

    Returns Promise<string>

    A Promise that resolves with a string.

Generated using TypeDoc