UNPKG

@n8n/n8n-nodes-langchain

Version:

![Banner image](https://user-images.githubusercontent.com/10284570/173569848-c624317f-42b1-45a6-ab09-f0ea3c247648.png)

26 lines (25 loc) 1.82 kB
import type { IDataObject, IHttpRequestOptions, ISupplyDataFunctions } from 'n8n-workflow'; import type { PlaceholderDefinition, SendIn, ToolParameter } from './interfaces'; import type { DynamicZodObject } from '../../../types/zod.types'; export declare const configureHttpRequestFunction: (ctx: ISupplyDataFunctions, credentialsType: "predefinedCredentialType" | "genericCredentialType" | "none", itemIndex: number) => Promise<(options: IHttpRequestOptions) => Promise<any>>; export declare const configureResponseOptimizer: (ctx: ISupplyDataFunctions, itemIndex: number) => (response: string) => string; export declare const extractParametersFromText: (placeholders: PlaceholderDefinition[], text: string, sendIn: SendIn, key?: string) => ToolParameter[]; export declare const updateParametersAndOptions: (options: { ctx: ISupplyDataFunctions; itemIndex: number; toolParameters: ToolParameter[]; placeholdersDefinitions: PlaceholderDefinition[]; requestOptions: IHttpRequestOptions; rawRequestOptions: { [key: string]: string; }; requestOptionsProperty: "headers" | "qs" | "body"; inputTypePropertyName: string; jsonPropertyName: string; parametersPropertyName: string; }) => void; export declare const prepareToolDescription: (toolDescription: string, toolParameters: ToolParameter[]) => string; export declare const configureToolFunction: (ctx: ISupplyDataFunctions, itemIndex: number, toolParameters: ToolParameter[], requestOptions: IHttpRequestOptions, rawRequestOptions: { [key: string]: string; }, httpRequest: (options: IHttpRequestOptions) => Promise<any>, optimizeResponse: (response: string) => string) => (query: string | IDataObject) => Promise<string>; export declare function makeToolInputSchema(parameters: ToolParameter[]): DynamicZodObject;