Skip to content

Commit 234be09

Browse files
committed
parametrized env output to agent_args
1 parent 5f675ba commit 234be09

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/agentlab/agents/tool_use_agent/agent.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ class ToolUseAgentArgs(AgentArgs):
6565
model_args: OpenAIResponseModelArgs = None
6666
use_first_obs: bool = True
6767
tag_screenshot: bool = True
68+
use_raw_page_output: bool = True
6869

6970
def __post_init__(self):
7071
try:

src/agentlab/experiments/loop.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,11 +401,15 @@ def run(self):
401401
agent = self.agent_args.make_agent()
402402
logger.debug("Agent created.")
403403

404+
if hasattr(self.agent_args, "use_raw_page_output"):
405+
use_raw_page_output = self.agent_args.use_raw_page_output
406+
else:
407+
use_raw_page_output = False
408+
404409
env = self.env_args.make_env(
405410
action_mapping=agent.action_set.to_python_code,
406411
exp_dir=self.exp_dir,
407-
use_raw_page_output=True, # TODO:thibault Parametrize this one way or the other.
408-
# Could be smth like self.agent_args.use_raw_page_output
412+
use_raw_page_output=use_raw_page_output,
409413
)
410414

411415
logger.debug("Environment created.")

0 commit comments

Comments
 (0)