Spaces:
Runtime error
Runtime error
Update inference.py
Browse files- inference.py +11 -2
inference.py
CHANGED
|
@@ -257,7 +257,16 @@ def run_task(task_id):
|
|
| 257 |
elif not clarified:
|
| 258 |
action_dict = {"action_type": "ask_clarify", "payload": None}
|
| 259 |
elif not solution_offered:
|
| 260 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 261 |
else:
|
| 262 |
action_dict = {"action_type": "resolve", "payload": None}
|
| 263 |
|
|
@@ -332,4 +341,4 @@ def main():
|
|
| 332 |
|
| 333 |
|
| 334 |
if __name__ == "__main__":
|
| 335 |
-
main()
|
|
|
|
| 257 |
elif not clarified:
|
| 258 |
action_dict = {"action_type": "ask_clarify", "payload": None}
|
| 259 |
elif not solution_offered:
|
| 260 |
+
if task_id == "task_1":
|
| 261 |
+
payload = "I understand your frustration. I will reset your password and unlock your account immediately."
|
| 262 |
+
elif task_id == "task_2":
|
| 263 |
+
payload = "I understand the billing issue. We will issue a $20 credit refund and correct your plan."
|
| 264 |
+
elif task_id == "task_3":
|
| 265 |
+
payload = "This is critical. We are moving your export to priority queue and enabling partial export to meet your deadline."
|
| 266 |
+
else:
|
| 267 |
+
payload = None
|
| 268 |
+
|
| 269 |
+
action_dict = {"action_type": "offer_solution", "payload": payload}e}
|
| 270 |
else:
|
| 271 |
action_dict = {"action_type": "resolve", "payload": None}
|
| 272 |
|
|
|
|
| 341 |
|
| 342 |
|
| 343 |
if __name__ == "__main__":
|
| 344 |
+
main()
|