Spaces:
Build error
Build error
Update rag.py
Browse files
rag.py
CHANGED
@@ -112,8 +112,10 @@ def rag_chain(config, openai_api_key, rag_option, prompt):
|
|
112 |
db = document_retrieval_mongodb()
|
113 |
|
114 |
rag_chain = RetrievalQA.from_chain_type(llm,
|
115 |
-
chain_type_kwargs = {"prompt": RAG_CHAIN_PROMPT
|
116 |
-
|
|
|
|
|
117 |
return_source_documents = True,
|
118 |
verbose = False)
|
119 |
|
|
|
112 |
db = document_retrieval_mongodb()
|
113 |
|
114 |
rag_chain = RetrievalQA.from_chain_type(llm,
|
115 |
+
chain_type_kwargs = {"prompt": RAG_CHAIN_PROMPT,
|
116 |
+
"verbose": True},
|
117 |
+
retriever = db.as_retriever(search_kwargs = {"k": config["k"],
|
118 |
+
"verbose": True}),
|
119 |
return_source_documents = True,
|
120 |
verbose = False)
|
121 |
|