UNPKG

@n8n/n8n-nodes-langchain

Version:

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

32 lines (31 loc) 1.46 kB
import { BaseCallbackHandler } from '@langchain/core/callbacks/base'; import type { SerializedFields } from '@langchain/core/dist/load/map_keys'; import type { Serialized, SerializedNotImplemented, SerializedSecret } from '@langchain/core/load/serializable'; import type { BaseMessage } from '@langchain/core/messages'; import type { LLMResult } from '@langchain/core/outputs'; import type { IDataObject, ISupplyDataFunctions } from 'n8n-workflow'; import { NodeError } from 'n8n-workflow'; type RunDetail = { index: number; messages: BaseMessage[] | string[] | string; options: SerializedSecret | SerializedNotImplemented | SerializedFields; }; export declare class N8nNonEstimatingTracing extends BaseCallbackHandler { #private; private executionFunctions; name: string; awaitHandlers: boolean; connectionType: "ai_languageModel"; runsMap: Record<string, RunDetail>; options: { errorDescriptionMapper: (error: NodeError) => string | null | undefined; }; constructor(executionFunctions: ISupplyDataFunctions, options?: { errorDescriptionMapper?: (error: NodeError) => string; }); handleLLMEnd(output: LLMResult, runId: string): Promise<void>; handleLLMStart(llm: Serialized, prompts: string[], runId: string): Promise<void>; handleLLMError(error: IDataObject | Error, runId: string, parentRunId?: string): Promise<void>; setParentRunIndex(runIndex: number): void; } export {};