Modify the logic of SoM agent
This commit is contained in:
@@ -806,9 +806,9 @@ For each step, you will get an observation of the desktop by 1) a screenshot; an
|
||||
You are required to use `pyautogui` to perform the action grounded to the observation, but DONOT use the `pyautogui.locateCenterOnScreen` function to locate the element you want to operate with since we have no image of the element you want to operate with. DONOT USE `pyautogui.screenshot()` to make screenshot.
|
||||
You can replace x, y in the code with the tag of the element you want to operate with. such as:
|
||||
```python
|
||||
pyautogui.moveTo(tag#3)
|
||||
pyautogui.click(tag#2)
|
||||
pyautogui.dragTo(tag#1, button='left')
|
||||
pyautogui.moveTo(tag_3)
|
||||
pyautogui.click(tag_2)
|
||||
pyautogui.dragTo(tag_1, button='left')
|
||||
```
|
||||
When you think you can directly output precise x and y coordinates or there is no tag on which you want to interact, you can also use them directly.
|
||||
But you should be careful to ensure that the coordinates are correct.
|
||||
@@ -856,9 +856,9 @@ ACTION_GROUNDING_PROMPT_SEEACT = """
|
||||
You are required to use `pyautogui` to perform the action grounded to the observation, but DONOT use the `pyautogui.locateCenterOnScreen` function to locate the element you want to operate with since we have no image of the element you want to operate with. DONOT USE `pyautogui.screenshot()` to make screenshot.
|
||||
You can replace x, y in the code with the tag of the element you want to operate with. such as:
|
||||
```python
|
||||
pyautogui.moveTo(tag#3)
|
||||
pyautogui.click(tag#2)
|
||||
pyautogui.dragTo(tag#1, button='left')
|
||||
pyautogui.moveTo(tag_3)
|
||||
pyautogui.click(tag_2)
|
||||
pyautogui.dragTo(tag_1, button='left')
|
||||
```
|
||||
When you think you can directly output precise x and y coordinates or there is no tag on which you want to interact, you can also use them directly.
|
||||
But you should be careful to ensure that the coordinates are correct.
|
||||
|
||||
Reference in New Issue
Block a user