UNPKG

@n8n/n8n-nodes-langchain

Version:
45 lines (38 loc) • 1.41 kB
/** * Question and Answer Chain Node - Version 1.5 * Answer questions about retrieved documents */ export interface LcChainRetrievalQaV15Params { /** * Source for Prompt (User Message) * @default auto */ promptType?: 'auto' | 'guardrails' | 'define' | Expression<string>; /** * Prompt (User Message) * @displayOptions.show { promptType: ["define"] } * @required when the displayOptions conditions above match */ text?: string | Expression<string>; options?: { /** Template string used for the system prompt. This should include the variable `{context}` for the provided context. For text completion models, you should also include the variable `{input}` for the user’s query. */ systemPromptTemplate?: string | Expression<string>; }; } export type LcChainRetrievalQaV15Output = { response: string; }; export interface LcChainRetrievalQaV15SubnodeConfig { model: LanguageModelInstance | LanguageModelInstance[]; retriever: RetrieverInstance; } interface LcChainRetrievalQaV15NodeBase { type: '@n8n/n8n-nodes-langchain.chainRetrievalQa'; version: 1.5; } export type LcChainRetrievalQaV15ParamsNode = LcChainRetrievalQaV15NodeBase & { config: NodeConfig<LcChainRetrievalQaV15Params> & { subnodes: LcChainRetrievalQaV15SubnodeConfig }; output?: Items<LcChainRetrievalQaV15Output>; }; export type LcChainRetrievalQaV15Node = LcChainRetrievalQaV15ParamsNode;