Spaces:
Build error
Build error
Update rag.py
Browse files
rag.py
CHANGED
@@ -101,7 +101,6 @@ def llm_chain(config, openai_api_key, prompt):
|
|
101 |
|
102 |
with get_openai_callback() as cb:
|
103 |
completion = llm_chain.generate([{"question": prompt}])
|
104 |
-
print(cb)
|
105 |
|
106 |
return completion, llm_chain, cb
|
107 |
|
@@ -120,6 +119,5 @@ def rag_chain(config, openai_api_key, rag_option, prompt):
|
|
120 |
|
121 |
with get_openai_callback() as cb:
|
122 |
completion = rag_chain({"query": prompt})
|
123 |
-
print(cb)
|
124 |
|
125 |
return completion, rag_chain, cb
|
|
|
101 |
|
102 |
with get_openai_callback() as cb:
|
103 |
completion = llm_chain.generate([{"question": prompt}])
|
|
|
104 |
|
105 |
return completion, llm_chain, cb
|
106 |
|
|
|
119 |
|
120 |
with get_openai_callback() as cb:
|
121 |
completion = rag_chain({"query": prompt})
|
|
|
122 |
|
123 |
return completion, rag_chain, cb
|