LocalLm types documentation
    Preparing search index...

    Interface ToolDefSpec

    Specification for a tool that can be used within the conversation.

    ToolDefSpec

    const toolSpecExample: ToolDefSpec = {
    name: "WeatherFetcher",
    description: "Fetches weather information.",
    arguments: {
    location: {
    description: "The location for which to fetch the weather.",
    required: true
    }
    }
    };
    interface ToolDefSpec {
        arguments: {
            [key: string]: {
                description: string;
                required?: boolean;
                type?: string;
            };
        };
        description: string;
        name: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    arguments: {
        [key: string]: {
            description: string;
            required?: boolean;
            type?: string;
        };
    }

    Arguments required by the tool, with descriptions for each argument.

    description: string

    A description of what the tool does.

    name: string

    The name of the tool.