Update rag.py
Browse files
rag.py
CHANGED
@@ -103,7 +103,7 @@ def llm_chain(config, openai_api_key, prompt):
|
|
103 |
completion = llm_chain.generate([{"question": prompt}])
|
104 |
print(cb)
|
105 |
|
106 |
-
return completion, llm_chain
|
107 |
|
108 |
def rag_chain(config, openai_api_key, rag_option, prompt):
|
109 |
llm = get_llm(config, openai_api_key)
|
@@ -122,4 +122,4 @@ def rag_chain(config, openai_api_key, rag_option, prompt):
|
|
122 |
completion = rag_chain({"query": prompt})
|
123 |
print(cb)
|
124 |
|
125 |
-
return completion, rag_chain
|
|
|
103 |
completion = llm_chain.generate([{"question": prompt}])
|
104 |
print(cb)
|
105 |
|
106 |
+
return completion, llm_chain, cb
|
107 |
|
108 |
def rag_chain(config, openai_api_key, rag_option, prompt):
|
109 |
llm = get_llm(config, openai_api_key)
|
|
|
122 |
completion = rag_chain({"query": prompt})
|
123 |
print(cb)
|
124 |
|
125 |
+
return completion, rag_chain, cb
|