Spaces:
Runtime error
Runtime error
handle edge case where thinking is not invoked
Browse files
app.py
CHANGED
@@ -62,8 +62,10 @@ def parse_response(response):
|
|
62 |
reflection = reflection_match.group(1).strip() if reflection_match else ""
|
63 |
|
64 |
steps = re.findall(r'<step>(.*?)</step>', response, re.DOTALL)
|
65 |
-
|
66 |
-
|
|
|
|
|
67 |
|
68 |
def process_chat(message, history, model, system_prompt, thinking_budget, api_key):
|
69 |
print(f"Received message: {message}")
|
|
|
62 |
reflection = reflection_match.group(1).strip() if reflection_match else ""
|
63 |
|
64 |
steps = re.findall(r'<step>(.*?)</step>', response, re.DOTALL)
|
65 |
+
if answer is not "":
|
66 |
+
return answer, reflection, steps
|
67 |
+
else:
|
68 |
+
return response, "", ""
|
69 |
|
70 |
def process_chat(message, history, model, system_prompt, thinking_budget, api_key):
|
71 |
print(f"Received message: {message}")
|