Spaces:
Sleeping
Sleeping
Fix JSON response parsing in ux_testing_fsm function to directly access the response object.
Browse files
core.py
CHANGED
|
@@ -415,7 +415,7 @@ def ux_testing_fsm(persona: dict, task: str, image: str, available_actions: list
|
|
| 415 |
)
|
| 416 |
|
| 417 |
# Parse JSON response
|
| 418 |
-
parsed_response = json.loads(response)
|
| 419 |
|
| 420 |
# Validate action is in available actions
|
| 421 |
if parsed_response.get("action_taken") not in available_actions:
|
|
|
|
| 415 |
)
|
| 416 |
|
| 417 |
# Parse JSON response
|
| 418 |
+
parsed_response = json.loads(response)
|
| 419 |
|
| 420 |
# Validate action is in available actions
|
| 421 |
if parsed_response.get("action_taken") not in available_actions:
|