Skip to content

Commit fb7a157

Browse files
bug fixes
1 parent aac20a7 commit fb7a157

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

src/browsergym/workarena/config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
# Path to the Menu navigation task configuration
2121
ALL_MENU_PATH = str(resources.files(data_files).joinpath("task_configs/all_menu.json"))
22-
ALL_MENU_CUSTOM_GOAL_PATH = str(resources.files(data_files).joinpath("task_configs/all_menu_custom_goal.json"))
22+
ALL_MENU_CUSTOM_GOAL_PATH = str(resources.files(data_files).joinpath("task_configs/go_to_page.json"))
2323

2424
# Path to the dashboard/report retrieval task configurations
2525
DASHBOARD_RETRIEVAL_MINMAX_CONFIG_PATH = str(
@@ -268,7 +268,7 @@
268268

269269
## Change Request tasks
270270
CHANGE_CHANGE_REQUEST_APPROVER_CONFIG_PATH = str(
271-
resources.files(data_files).joinpath("task_configs/change_change_request_approver.json")
271+
resources.files(data_files).joinpath("task_configs/change_chg_approver.json")
272272
)
273273

274274
## Incident tasks
@@ -325,7 +325,7 @@
325325
resources.files(data_files).joinpath("task_configs/order_reset_password.json")
326326
)
327327
ORDER_PAPER_SUPPLIES_TASK_CONFIG_PATH = str(
328-
resources.files(data_files).joinpath("task_configs/order_paper_supplies.json")
328+
resources.files(data_files).joinpath("task_configs/order_paper_and_supplies.json")
329329
)
330330
ORDER_SOFTWARE_TASK_CONFIG_PATH = str(
331331
resources.files(data_files).joinpath("task_configs/order_software.json")

src/browsergym/workarena/tasks/change_request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def __init__(self, *args, **kwargs) -> None:
4242

4343
self.change_request_sys_id = self._get_change_request_sys_id(self.config["change_number"])
4444
self.change_request_approver_sys_id = None
45-
self.initial_change_request_approver_state = self._get_initial_change_request_approver_state(self.change_request_sys_id)
45+
self.initial_change_request_approver_state = self._get_initial_change_request_approver_state()
4646

4747
def _get_initial_change_request_approver_state(self) -> str:
4848
approvers = self._get_change_request_approvers_list(self.change_request_sys_id)

src/browsergym/workarena/tasks/interaction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class CreateInteractionTask(ServiceNowInteractionTask):
3939
def validate(self, page: playwright.sync_api.Page, chat_messages: List[str]) -> Tuple[float, bool, str, dict]:
4040

4141
# get customer problem from config
42-
customer_problem = self.config["customer_problem"]
42+
customer_problem = self.config["hardware_issue"]
4343

4444
# Query interaction table using LIKE operator
4545
# TODO: difficult to verify and test

src/browsergym/workarena/tasks/service_catalog.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,6 +924,8 @@ def validate(self, page: Page, chat_messages: list[str]) -> tuple[int, bool, str
924924

925925
incident_short_description = self._get_incident_short_description()
926926
incident_work_notes = self._get_incident_work_notes()
927+
if incident_short_description is None or incident_work_notes is None:
928+
return 0, False, "", {"message": "The incident short description or work notes is not found."}
927929

928930
# sanity check short description
929931
if not incident_short_description.startswith("Reset the password"):
@@ -1048,7 +1050,7 @@ def validate(self, page: Page, chat_messages: list[str]) -> tuple[int, bool, str
10481050
__TASKS__ = [
10491051
var
10501052
for var in locals().values()
1051-
if isinstance(var, type) and issubclass(var, OrderHardwareTask) and var is not OrderHardwareTask
1053+
if isinstance(var, type) and issubclass(var, OrderHardwareTask) and var is not OrderHardwareTask and not issubclass(var, OrderFromServiceCatalogTask)
10521054
]
10531055

10541056
__DYNAMIC_GUIDANCE_TASKS__ = [

0 commit comments

Comments
 (0)