Skip to content

Commit

Permalink
fix REPLAY_ env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
Domiii committed Jan 16, 2025
1 parent ed68b34 commit 5249558
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion openhands/agenthub/codeact_agent/codeact_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def get_observation_message(
new_phase = obs.new_phase
if new_phase == ReplayDebuggingPhase.Edit:
# Tell the agent to stop analyzing and start editing:
text = "You have concluded the analysis.\nIMPORTANT: NOW review, then implement the hypothesized changes using the edit tools available to you. The code is available in the workspace.\nIMPORTANT: Don't stop. Fix the bug.\nIMPORTANT: Don't stop. Fix the bug."
text = "You have concluded the analysis.\nIMPORTANT: NOW review, then implement the hypothesized changes using tools. The code is available in the workspace.\nIMPORTANT: Don't stop. Fix the bug.\nIMPORTANT: Don't stop. Fix the bug."
message = Message(role='user', content=[TextContent(text=text)])
else:
raise NotImplementedError(
Expand Down
10 changes: 7 additions & 3 deletions openhands/runtime/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,14 @@ def setup_initial_env(self) -> None:
if self.config.sandbox.runtime_startup_env_vars:
self.add_env_vars(self.config.sandbox.runtime_startup_env_vars)

logger.debug('Maybe adding replay env vars')
if self.config.replay.api_key:
self.add_env_vars({'REPLAY_API_KEY': self.config.replay.api_key})
logger.debug('Added REPLAY_API_KEY to environment')
self.add_env_vars(
{
'REPLAY_API_KEY': self.config.replay.api_key,
'REPLAY_DEV_MODE': os.environ['REPLAY_DEV_MODE'],
'REPLAY_ENABLE_TOOL_CACHE': os.environ['REPLAY_DEV_MODE'],
}
)
if self.config.replay.dir:
self.add_env_vars({'REPLAY_DIR': self.config.replay.dir})
logger.debug('Added REPLAY_DIR to environment')
Expand Down

0 comments on commit 5249558

Please sign in to comment.