@@ -119,15 +119,6 @@ def is_goal_set(self) -> bool:
119119 """Check if the goal is set in the first group."""
120120 return len (self .groups ) > 0
121121
122- def contains_image (self ) -> bool :
123- """Check if an image is set in any group"""
124- for grp in self .groups :
125- for msg in grp .messages :
126- for item in msg .content :
127- if "image" in item :
128- return True
129- return False
130-
131122
132123SYS_MSG = """You are a web agent. Based on the observation, you will decide which action to take to accomplish your goal.
133124You strive for excellence and need to be as meticulous as possible. Make sure to explore when not sure.
@@ -176,7 +167,7 @@ class Obs(Block):
176167 use_dom : bool = False
177168 use_som : bool = False
178169 use_tabs : bool = False
179- add_mouse_pointer : bool = False
170+ # add_mouse_pointer: bool = False
180171 use_zoomed_webpage : bool = False
181172
182173 def apply (
@@ -196,15 +187,14 @@ def apply(
196187 else :
197188 screenshot = obs ["screenshot" ]
198189
199- if self .add_mouse_pointer :
200- screenshot = np .array (
201- agent_utils .add_mouse_pointer_from_action (
202- Image .fromarray (obs ["screenshot" ]), obs ["last_action" ]
203- )
204- )
205-
206- obs_msg .add_image (image_to_png_base64_url (screenshot ))
190+ # if self.add_mouse_pointer:
191+ # screenshot = np.array(
192+ # agent_utils.add_mouse_pointer_from_action(
193+ # Image.fromarray(obs["screenshot"]), obs["last_action"]
194+ # )
195+ # )
207196
197+ obs_msg .add_image (image_to_png_base64_url (screenshot ))
208198 if self .use_axtree :
209199 obs_msg .add_text (f"AXTree:\n { AXTREE_NOTE } \n { obs ['axtree_txt' ]} " )
210200 if self .use_dom :
0 commit comments