Skip to content

Commit a4ba2f5

Browse files
TLSDCgasse
authored andcommitted
adding screenshot descriptions
1 parent cd61c80 commit a4ba2f5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/agentlab/agents/dynamic_prompting.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,12 @@ def add_screenshot(self, prompt: BaseMessage) -> BaseMessage:
446446
if self.flags.use_screenshot:
447447
if self.flags.use_som:
448448
screenshot = self.obs["screenshot_som"]
449+
prompt.add_text(
450+
"\n## Screenshot:\nHere is a screenshot of the page, it is annotated with bounding boxes and corresponding bids:"
451+
)
449452
else:
450453
screenshot = self.obs["screenshot"]
454+
prompt.add_text("\n## Screenshot:\nHere is a screenshot of the page:")
451455
img_url = image_to_jpg_base64_url(screenshot)
452456
prompt.add_image(img_url, detail=self.flags.openai_vision_detail)
453457
return prompt

0 commit comments

Comments
 (0)