Class DynamicStructuredTool<T>

A tool that can be created dynamically from a function, name, and description, designed to work with structured data. It extends the StructuredTool class and overrides the _call method to execute the provided function when the tool is called.

Type Parameters

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

Hierarchy

  • StructuredTool
    • DynamicStructuredTool

Constructors

Properties

Constructors

  • Type Parameters

    • T extends ZodObject<any, any, any, any, {}, T> = ZodObject<any, any, any, any, {}>

    Parameters

    Returns DynamicStructuredTool<T>

Properties

description: string
func: ((input, runManager?) => Promise<string>)

Type declaration

    • (input, runManager?): Promise<string>
    • Parameters

      • input: any
      • Optional runManager: CallbackManagerForToolRun

      Returns Promise<string>

name: string
schema: T

Generated using TypeDoc