@n8n/n8n-nodes-langchain
Version:

16 lines (15 loc) • 1.24 kB
TypeScript
import type { BaseMessage } from '@langchain/core/messages';
import { Tool } from '@langchain/core/tools';
import type { ICredentialDataDecryptedObject, IExecuteFunctions, ISupplyDataFunctions, IWebhookFunctions } from 'n8n-workflow';
export declare function getPromptInputByType(options: {
ctx: IExecuteFunctions | ISupplyDataFunctions;
i: number;
promptTypeKey: string;
inputKey: string;
}): string;
export declare function getSessionId(ctx: ISupplyDataFunctions | IWebhookFunctions, itemIndex: number, selectorKey?: string, autoSelect?: string, customKey?: string): string;
export declare function serializeChatHistory(chatHistory: BaseMessage[]): string;
export declare function escapeSingleCurlyBrackets(text?: string): string | undefined;
export declare const getConnectedTools: (ctx: IExecuteFunctions | IWebhookFunctions | ISupplyDataFunctions, enforceUniqueNames: boolean, convertStructuredTool?: boolean, escapeCurlyBrackets?: boolean) => Promise<Tool[]>;
export declare function mergeCustomHeaders(credentials: ICredentialDataDecryptedObject, defaultHeaders: Record<string, string>): Record<string, string>;
export declare function unwrapNestedOutput(output: Record<string, unknown>): Record<string, unknown>;