Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/agentlab/agents/generic_agent/generic_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ def get_action(self, obs):
main_prompt = MainPrompt(
action_set=self.action_set,
obs_history=self.obs_history,
goal_object=obs["goal_object"],
actions=self.actions,
memories=self.memories,
thoughts=self.thoughts,
Expand Down Expand Up @@ -270,3 +269,4 @@ def get_action_post_hoc(agent: GenericAgent, obs: dict, ans_dict: dict):

return system_prompt, instruction_prompt, output
return system_prompt, instruction_prompt, output
return system_prompt, instruction_prompt, output
3 changes: 1 addition & 2 deletions src/agentlab/agents/generic_agent/generic_agent_prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ def __init__(
self,
action_set: AbstractActionSet,
obs_history: list[dict],
goal_object: list[dict],
actions: list[str],
memories: list[str],
thoughts: list[str],
Expand All @@ -72,7 +71,7 @@ def __init__(
"Agent is in goal mode, but multiple user messages are present in the chat. Consider switching to `enable_chat=True`."
)
self.instructions = dp.GoalInstructions(
goal_object, extra_instructions=flags.extra_instructions
obs_history[-1]["goal_object"], extra_instructions=flags.extra_instructions
)

self.obs = dp.Observation(obs_history[-1], self.flags.obs)
Expand Down
5 changes: 1 addition & 4 deletions tests/agents/test_generic_prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"last_action_error": "Hey, there is an error now",
},
]
GOAL_OBJECT = [{"type": "text", "text": "do this and that"}]
ACTIONS = ["click('41')", "click('42')"]
MEMORIES = ["memory A", "memory B"]
THOUGHTS = ["thought A", "thought B"]
Expand Down Expand Up @@ -168,7 +167,6 @@ def test_shrinking_observation():
prompt_maker = MainPrompt(
action_set=dp.HighLevelActionSet(),
obs_history=OBS_HISTORY,
goal_object=GOAL_OBJECT,
actions=ACTIONS,
memories=MEMORIES,
thoughts=THOUGHTS,
Expand Down Expand Up @@ -213,7 +211,6 @@ def test_main_prompt_elements_gone_one_at_a_time(flag_name: str, expected_prompt
MainPrompt(
action_set=flags.action.action_set.make_action_set(),
obs_history=OBS_HISTORY,
goal_object=GOAL_OBJECT,
actions=ACTIONS,
memories=memories,
thoughts=THOUGHTS,
Expand All @@ -236,7 +233,6 @@ def test_main_prompt_elements_present():
MainPrompt(
action_set=dp.HighLevelActionSet(),
obs_history=OBS_HISTORY,
goal_object=GOAL_OBJECT,
actions=ACTIONS,
memories=MEMORIES,
thoughts=THOUGHTS,
Expand All @@ -262,3 +258,4 @@ def test_main_prompt_elements_present():
test_main_prompt_elements_gone_one_at_a_time(flag, expected_prompts)
test_main_prompt_elements_gone_one_at_a_time(flag, expected_prompts)
test_main_prompt_elements_gone_one_at_a_time(flag, expected_prompts)
test_main_prompt_elements_gone_one_at_a_time(flag, expected_prompts)