Spaces:
Sleeping
Sleeping
Commit
·
6c7c762
1
Parent(s):
4d7f560
Fix retry flag
Browse files
app.py
CHANGED
|
@@ -133,8 +133,9 @@ def parse_from_category(category, extracted_text):
|
|
| 133 |
print("\tProcessed text")
|
| 134 |
try:
|
| 135 |
information = chain.output_parser.parse_with_prompt(answer, formatted_prompt)
|
|
|
|
|
|
|
| 136 |
information = information.json() if information else {}
|
| 137 |
-
information['retry'] = True
|
| 138 |
except OutputParserException as e:
|
| 139 |
information = {
|
| 140 |
"error": "Unable to parse chatbot output",
|
|
|
|
| 133 |
print("\tProcessed text")
|
| 134 |
try:
|
| 135 |
information = chain.output_parser.parse_with_prompt(answer, formatted_prompt)
|
| 136 |
+
if information:
|
| 137 |
+
information['retry'] = True
|
| 138 |
information = information.json() if information else {}
|
|
|
|
| 139 |
except OutputParserException as e:
|
| 140 |
information = {
|
| 141 |
"error": "Unable to parse chatbot output",
|