Interface ToolCodeNodeParameters

Source
interface ToolCodeNodeParameters {
    description?: string;
    inputSchema?: string;
    jsCode?: string;
    jsonSchemaExample?: string;
    language?: "javaScript" | "python";
    name?: string;
    pythonCode?: string;
    schemaType?: "manual" | "fromJson";
    specifyInputSchema?: boolean;
}

Properties§

Source§

readonly description?: string

Type options: {"rows":3}

Source§

readonly inputSchema?: string

Schema to use for the function Default: "{\n"type": "object",\n"properties": {\n\t"some_input": {\n\t\t"type": "string",\n\t\t"description": "Some input to the function"\n\t\t}\n\t}\n}" Type options: {"rows":10}

Source§

readonly jsCode?: string

E.g. Converts any text to uppercase Default: "// Example: convert the incoming query to uppercase and return it\nreturn query.toUpperCase()" Type options: {"editor":"jsEditor"}

Source§

readonly jsonSchemaExample?: string

Example JSON object to use to generate the schema Default: "{\n\t"some_input": "some_value"\n}" Type options: {"rows":10}

Source§

readonly language?: "javaScript" | "python"

Default: "javaScript"

Source§

readonly name?: string

Source§

readonly pythonCode?: string

E.g. Converts any text to uppercase Default: "# Example: convert the incoming query to uppercase and return it\nreturn query.upper()" Type options: {"editor":"codeNodeEditor","editorLanguage":"python"}

Source§

readonly schemaType?: "manual" | "fromJson"

How to specify the schema for the function Default: "fromJson"

Source§

readonly specifyInputSchema?: boolean

Whether to specify the schema for the function. This would require the LLM to provide the input in the correct format and would validate it against the schema.