Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -164,6 +164,7 @@ def invoke(openai_api_key, rag_option, prompt):
|
|
164 |
chain = None
|
165 |
completion = ""
|
166 |
result = ""
|
|
|
167 |
llm_output = ""
|
168 |
err_msg = ""
|
169 |
try:
|
@@ -187,11 +188,13 @@ def invoke(openai_api_key, rag_option, prompt):
|
|
187 |
completion, chain = llm_chain(llm, prompt)
|
188 |
if (completion.generations[0] != None and completion.generations[0][0] != None):
|
189 |
result = completion.generations[0][0].text
|
190 |
-
|
191 |
-
llm_output = completion.generations.llm_output
|
192 |
print(completion)
|
193 |
print("###")
|
194 |
print(completion.generations[0])
|
|
|
|
|
|
|
195 |
except Exception as e:
|
196 |
err_msg = e
|
197 |
raise gr.Error(e)
|
|
|
164 |
chain = None
|
165 |
completion = ""
|
166 |
result = ""
|
167 |
+
generation_info = ""
|
168 |
llm_output = ""
|
169 |
err_msg = ""
|
170 |
try:
|
|
|
188 |
completion, chain = llm_chain(llm, prompt)
|
189 |
if (completion.generations[0] != None and completion.generations[0][0] != None):
|
190 |
result = completion.generations[0][0].text
|
191 |
+
print("###")
|
|
|
192 |
print(completion)
|
193 |
print("###")
|
194 |
print(completion.generations[0])
|
195 |
+
print("###")
|
196 |
+
generation_info = completion.generations[0][0].generation_info
|
197 |
+
#llm_output = completion.generations.llm_output
|
198 |
except Exception as e:
|
199 |
err_msg = e
|
200 |
raise gr.Error(e)
|