/**
 * Question and Answer Chain Node - Version 1.3
 * Answer questions about retrieved documents
 */


export interface LcChainRetrievalQaV13Params {
/**
 * 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 `{question}` for the user’s query.
     */
    systemPromptTemplate?: string | Expression<string>;
  };
}

export type LcChainRetrievalQaV13Output = {
  response: string;
};

export interface LcChainRetrievalQaV13SubnodeConfig {
  model: LanguageModelInstance | LanguageModelInstance[];
  retriever: RetrieverInstance;
}

interface LcChainRetrievalQaV13NodeBase {
  type: '@n8n/n8n-nodes-langchain.chainRetrievalQa';
  version: 1.3;
}

export type LcChainRetrievalQaV13ParamsNode = LcChainRetrievalQaV13NodeBase & {
  config: NodeConfig<LcChainRetrievalQaV13Params> & { subnodes: LcChainRetrievalQaV13SubnodeConfig };
  output?: Items<LcChainRetrievalQaV13Output>;
};

export type LcChainRetrievalQaV13Node = LcChainRetrievalQaV13ParamsNode;