Fix docstring of RetrievalQA (#3231)

Structure changed an RetrievalQA now expects BaseRetriever not
VectorStore
This commit is contained in:
Peter Stolz 2023-04-20 19:46:51 +02:00 committed by GitHub
parent b7dea80cba
commit d54b977d4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -154,8 +154,9 @@ class RetrievalQA(BaseRetrievalQA):
from langchain.llms import OpenAI
from langchain.chains import RetrievalQA
from langchain.faiss import FAISS
vectordb = FAISS(...)
retrievalQA = RetrievalQA.from_llm(llm=OpenAI(), retriever=vectordb)
from langchain.vectorstores.base import VectorStoreRetriever
retriever = VectorStoreRetriever(vectorstore=FAISS(...))
retrievalQA = RetrievalQA.from_llm(llm=OpenAI(), retriever=retriever)
"""