n8n-nodes-tushare
Version:
n8n custom node for Tushare
30 lines (29 loc) • 813 B
TypeScript
import { Tool } from '@langchain/core/tools';
import { z } from 'zod';
export interface DataToolFields {
name: string;
description: string;
token: string;
timeout?: number;
inputFields?: Array<{
fieldName: string;
description: string;
type?: 'string' | 'number' | 'boolean' | 'date';
required?: boolean;
defaultValue?: any;
}>;
}
export declare class TushareTool extends Tool {
name: string;
description: string;
token: string;
timeout: number;
private customSchema;
constructor(fields: DataToolFields);
private static generateSchema;
getSchema(): z.ZodObject<any>;
static lc_name(): string;
get lc_namespace(): string[];
protected _call(input: string): Promise<string>;
private processDataRequest;
}