Spaces:
Sleeping
Sleeping
add logs for possible errors
Browse files
app.py
CHANGED
@@ -19,6 +19,7 @@ def safe_parse_json(model_answer):
|
|
19 |
return json.loads(model_answer)
|
20 |
except json.JSONDecodeError as e:
|
21 |
print("Failed to parse JSON: %s", e)
|
|
|
22 |
return None
|
23 |
|
24 |
def check_password():
|
@@ -210,6 +211,7 @@ def reasoner(query: str, documents: list[str], llm_client: Any):
|
|
210 |
reasoning = answer_dict.get("reasoning", "")
|
211 |
except:
|
212 |
print(f"Error with parsing the returned {answer_dict}")
|
|
|
213 |
|
214 |
for chunk in message.split():
|
215 |
text += chunk + " "
|
|
|
19 |
return json.loads(model_answer)
|
20 |
except json.JSONDecodeError as e:
|
21 |
print("Failed to parse JSON: %s", e)
|
22 |
+
print(f"Raw model answer is: {model_answer}")
|
23 |
return None
|
24 |
|
25 |
def check_password():
|
|
|
211 |
reasoning = answer_dict.get("reasoning", "")
|
212 |
except:
|
213 |
print(f"Error with parsing the returned {answer_dict}")
|
214 |
+
decision, reasoning = "", ""
|
215 |
|
216 |
for chunk in message.split():
|
217 |
text += chunk + " "
|