Spaces:
Build error
Build error
Update rag.py
Browse files
rag.py
CHANGED
@@ -104,6 +104,9 @@ def llm_chain(config, openai_api_key, prompt):
|
|
104 |
|
105 |
def rag_chain(config, openai_api_key, rag_option, prompt):
|
106 |
llm = get_llm(config, openai_api_key)
|
|
|
|
|
|
|
107 |
|
108 |
if (rag_option == RAG_CHROMA):
|
109 |
db = document_retrieval_chroma()
|
|
|
104 |
|
105 |
def rag_chain(config, openai_api_key, rag_option, prompt):
|
106 |
llm = get_llm(config, openai_api_key)
|
107 |
+
|
108 |
+
with get_openai_callback() as cb:
|
109 |
+
print(cb)
|
110 |
|
111 |
if (rag_option == RAG_CHROMA):
|
112 |
db = document_retrieval_chroma()
|