Skip to content

Commit 7d19c07

Browse files
committed
update
1 parent 03d777c commit 7d19c07

3 files changed

Lines changed: 4 additions & 9 deletions

File tree

src/agentlab/agents/vl_agent/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
use_error=True,
3434
use_abstract_example=True,
3535
use_concrete_example=False,
36+
extra_instruction=None,
3637
)
3738
}
3839

src/agentlab/agents/vl_agent/vl_agent/ui_agent.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,7 @@ def __init__(
3535
@cost_tracker_decorator
3636
def get_action(self, obs: dict) -> tuple[str, dict]:
3737
ui_prompt = self.ui_prompt_args.make_prompt(
38-
obs=obs,
39-
thoughts=self.thoughts,
40-
actions=self.actions,
41-
action_set=self.action_set,
42-
extra_instructions=None,
43-
preliminary_answer=None,
38+
obs=obs, thoughts=self.thoughts, actions=self.actions, action_set=self.action_set
4439
)
4540
try:
4641
messages = ui_prompt.get_messages()
@@ -62,7 +57,6 @@ def get_action(self, obs: dict) -> tuple[str, dict]:
6257
thoughts=self.thoughts,
6358
actions=self.actions,
6459
action_set=self.action_set,
65-
extra_instructions=None,
6660
preliminary_answer=preliminary_answer,
6761
)
6862
try:

src/agentlab/agents/vl_agent/vl_prompt/ui_prompt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,19 +264,19 @@ class UIPromptArgs(VLPromptArgs):
264264
use_error: bool
265265
use_abstract_example: bool
266266
use_concrete_example: bool
267+
extra_instruction: Optional[str]
267268

268269
def make_prompt(
269270
self,
270271
obs: dict,
271272
thoughts: list[str],
272273
actions: list[str],
273274
action_set: HighLevelActionSet,
274-
extra_instruction: Optional[str] = None,
275275
preliminary_answer: Optional[dict] = None,
276276
) -> UIPrompt:
277277
system_prompt_part = SystemPromptPart()
278278
instruction_prompt_part = InstructionPromptPart(
279-
goal_object=obs["goal_object"], extra_instruction=extra_instruction
279+
goal_object=obs["goal_object"], extra_instruction=self.extra_instruction
280280
)
281281
if self.use_screenshot:
282282
screenshot_prompt_part = ScreenshotPromptPart(obs["screenshot"])

0 commit comments

Comments
 (0)