题意:
在 TypeScript 的 LangChain 中,loadQAChain
中的 _type: undefined
无效。
问题背景:
I am trying to use loadQAChain
with a custom prompt. The code to make the chain looks like this:
我正在尝试使用 loadQAChain
和自定义提示符。构建链的代码如下所示:
import { OpenAI } from 'langchain/llms/openai';
import { PineconeStore } from 'langchain/vectorstores/pinecone';
import { LLMChain, loadQAChain, ChatVectorDBQAChain } from 'langchain/chains';
import { PromptTemplate } from 'langchain/prompts';
const CONDENSE_PROMPT =
PromptTemplate.fromTemplate(`Given the following conversation and a follow up question, rephrase the follow up question to be a standal