Add raw accessibility-tree based prompting method (but the tokens are too large); Minor fix some small bugs

This commit is contained in:
Timothyxxx
2024-01-16 11:58:23 +08:00
parent 28d8c0c528
commit 8efa692951
10 changed files with 272 additions and 4 deletions

View File

@@ -204,7 +204,10 @@ class DesktopEnv(gym.Env):
time.sleep(5)
logger.info("Environment setup complete.")
observation = {"screenshot": self._get_obs()}
observation = {
"screenshot": self._get_obs(),
"accessibility_tree": self.controller.get_accessibility_tree(),
}
return observation
def step(self, action, pause=0.5):

View File

@@ -4,7 +4,7 @@ import functools
import operator
import re
from numbers import Number
from typing import Callable, Any
from typing import Callable, Any, Union
from typing import Dict, List, Pattern
import lxml.etree