Spaces:
Build error
Build error
Update rag.py
Browse files
rag.py
CHANGED
@@ -107,9 +107,9 @@ def rag_chain(config, openai_api_key, rag_option, prompt):
|
|
107 |
llm = get_llm(config, openai_api_key)
|
108 |
|
109 |
if (rag_option == RAG_CHROMA):
|
110 |
-
db = document_retrieval_chroma(
|
111 |
elif (rag_option == RAG_MONGODB):
|
112 |
-
db = document_retrieval_mongodb(
|
113 |
|
114 |
rag_chain = RetrievalQA.from_chain_type(llm,
|
115 |
chain_type_kwargs = {"prompt": RAG_CHAIN_PROMPT},
|
|
|
107 |
llm = get_llm(config, openai_api_key)
|
108 |
|
109 |
if (rag_option == RAG_CHROMA):
|
110 |
+
db = document_retrieval_chroma()
|
111 |
elif (rag_option == RAG_MONGODB):
|
112 |
+
db = document_retrieval_mongodb()
|
113 |
|
114 |
rag_chain = RetrievalQA.from_chain_type(llm,
|
115 |
chain_type_kwargs = {"prompt": RAG_CHAIN_PROMPT},
|