Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev/reformat #69

Merged
merged 20 commits into from
May 8, 2024
Prev Previous commit
Next Next commit
minor fix
  • Loading branch information
vyokky committed May 8, 2024
commit b748266823f1bd4fbf5eb6996128ebad6eacf65a
8 changes: 7 additions & 1 deletion ufo/automator/ui_control/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,13 @@ def click_input(self, params: Dict):
:param params: The arguments of the click method.
:return: The result of the click action.
"""
return self.atomic_execution("click_input", params)

api_name = configs.get("CLICK_API", "click_input")

if api_name == "click":
return self.atomic_execution("click", params)
else:
return self.atomic_execution("click_input", params)

def summary(self, params: Dict):
"""
Expand Down
1 change: 1 addition & 0 deletions ufo/config/config_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ DEMONSTRATION_PROMPT: "ufo/prompts/demonstration/demonstration_summary.yaml"
DEMONSTRATION_SAVED_PATH: "vectordb/demonstration/"

API_PROMPT: "ufo/prompts/share/base/api.yaml" # The prompt for the API
CLICK_API: "click" # The click API
INPUT_TEXT_API: "type_keys" # The input text API
INPUT_TEXT_ENTER: True # whether to press enter after typing the text

Expand Down
3 changes: 3 additions & 0 deletions ufo/module/processors/follower_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@


class FollowerHostAgentProcessor(HostAgentProcessor):
"""
Follower host agent processor to handle the AppAgent in the follower mode.
"""

def create_sub_agent(self) -> FollowerAgent:
"""
Expand Down
2 changes: 1 addition & 1 deletion ufo/module/processors/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ def _safe_guard_judgement(self, action, control_text) -> bool:
self._status = Status.FINISH
return True

def get_control_reannotate(self) -> List:
def get_control_reannotate(self) -> List[UIAWrapper]:
"""
Get the control to reannotate.
:return: The control to reannotate.
Expand Down