Spaces:
Build error
Build error
Update rag.py
Browse files
rag.py
CHANGED
@@ -100,6 +100,9 @@ def llm_chain(config, openai_api_key, prompt):
|
|
100 |
prompt = LLM_CHAIN_PROMPT)
|
101 |
|
102 |
completion = llm_chain.generate([{"question": prompt}])
|
|
|
|
|
|
|
103 |
|
104 |
return completion, llm_chain
|
105 |
|
|
|
100 |
prompt = LLM_CHAIN_PROMPT)
|
101 |
|
102 |
completion = llm_chain.generate([{"question": prompt}])
|
103 |
+
|
104 |
+
with get_openai_callback() as cb:
|
105 |
+
print(cb)
|
106 |
|
107 |
return completion, llm_chain
|
108 |
|