小编imj*_*esr的帖子

如何更改LangChain默认返回的4个文档?

我有以下代码实现 LangChain + ChatGPT 以回答给定数据的问题:

import { PineconeStore } from 'langchain/vectorstores/pinecone';
import { ConversationalRetrievalQAChain } from 'langchain/chains';

const CONDENSE_PROMPT = `Given the following conversation and a follow up question, rephrase the follow up question to be a standalone question.

Chat History:
{chat_history}
Follow Up Input: {question}
Standalone question:`;

const QA_PROMPT = `You are a helpful AI assistant. Use the following pieces of context to answer the question at the end.
If you don't know the answer, just say you don't …
Run Code Online (Sandbox Code Playgroud)

openai-api gpt-4 langchain

5
推荐指数
1
解决办法
1304
查看次数

标签 统计

gpt-4 ×1

langchain ×1

openai-api ×1