小编Mas*_*ion的帖子

如何在具有历史记录的文档上向 Langchain ConversationalRetrievalChain 聊天添加提示?

Langchain增加了这个功能ConversationalRetrievalChain,用于与历史文档聊天。根据他们的文档ConversationalRetrievalChain我需要传递作为函数指令的提示。我怎样才能通过这个函数调用来实现这一点?

这是代码

qa = ConversationalRetrievalChain.from_llm(OpenAI(temperature=0), vectorstore.as_retriever(), memory=memory)
Run Code Online (Sandbox Code Playgroud)

python artificial-intelligence openai-api langchain

11
推荐指数
1
解决办法
2万
查看次数