@n8n/n8n-nodes-langchain
Version:
22 lines (21 loc) • 1.44 kB
TypeScript
import type { BaseMessage } from '@langchain/core/messages';
import { Tool } from '@langchain/core/tools';
import type { ICredentialDataDecryptedObject, IDataObject, 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, options?: {
inputData?: IDataObject;
}) => Promise<Tool[]>;
export declare function getCustomCredentialHeader(credentials: ICredentialDataDecryptedObject): {
name: string;
value: string;
} | undefined;
export declare function mergeCustomHeaders(credentials: ICredentialDataDecryptedObject, defaultHeaders: Record<string, string>): Record<string, string>;
export declare function unwrapNestedOutput(output: Record<string, unknown>): Record<string, unknown>;