langchain.js
    Preparing search index...

    Class WriteFileTool

    Class for writing data to files on the disk. Extends the StructuredTool class.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    Constructors

    • Parameters

      • __namedParameters: WriteFileParams

      Returns WriteFileTool

    Properties

    description: string = "Write file from disk"
    name: string = "write_file"
    schema: ZodObject<
        { file_path: ZodString; text: ZodString },
        "strip",
        ZodTypeAny,
        { file_path: string; text: string },
        { file_path: string; text: string },
    > = writeSchema
    store: BaseFileStore

    Methods

    • Parameters

      • __namedParameters: InferInteropZodOutput<
            ZodObject<
                { file_path: ZodString; text: ZodString },
                "strip",
                ZodTypeAny,
                { file_path: string; text: string },
                { file_path: string; text: string },
            >,
        >

      Returns Promise<string>

    • Returns string