uipath v2 (#413)

* submission v2

* small updates
This commit is contained in:
alexandruilie7
2026-01-09 02:47:20 +02:00
committed by GitHub
parent 5ef8bdfa35
commit 5463d3bb89
11 changed files with 643 additions and 425 deletions

View File

@@ -73,7 +73,7 @@ def map_uipath_agent_actions_to_osworld(actions):
if params["click_type"] == "double":
return {"action_type": "DOUBLE_CLICK", "x": x, "y": y}
elif params["click_type"] == "triple":
return {"action_type": "TRIPLE_CLICK", "x": x, "y": y}
return {"action_type": "CLICK", "x": x, "y": y, "num_clicks": 3}
else:
raise ValueError(f"Unknown click type: {params['click_type']}")
else:
@@ -165,23 +165,17 @@ class UipathBaseAgent:
{
"actions": rsp["step"]["actions"],
"description": rsp["step"]["description"],
"additional_parameters": {
"review": rsp["step"]["additional_parameters"]["review"],
"thought": rsp["step"]["additional_parameters"]["thought"],
"action_description": rsp["step"]["additional_parameters"][
"action_description"
],
"plan_action": rsp["step"]["additional_parameters"]["plan_action"],
},
"additional_parameters": rsp['step']['additional_parameters'],
"image": img_base64,
}
)
def predict(self, instruction: str, obs: Dict, args, step_idx) -> List:
if step_idx == args.max_steps - 1:
if step_idx >= args.max_steps - 1:
message = (
instruction
+ "The sudo password is password, if needed. This is the last step, you must return the finish actions with either success or failure, depending on the result. No further steps are allowed."
instruction + """You have reached the final step of the process.
At this point, no further actions can be taken - it may therefore be impossible to complete the task successfully.
Conclude by returning a finish action with success or failure, depending on what can be determined from the current state."""
)
else:
message = instruction + "The sudo password is password, if needed."
@@ -235,4 +229,4 @@ class UipathBaseAgent:
self.thoughts = []
self.actions = []
self.observations = []
self.uipath_hist = []
self.uipath_hist = []