Skip to content
Open
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
7 changes: 7 additions & 0 deletions verifiers/envs/experimental/rlm_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -2658,6 +2658,13 @@ async def get_prompt_messages(self, state: State) -> Messages:
# Subsequent turns: use parent implementation
return await super().get_prompt_messages(state)

async def env_response(self, messages: Messages, state: State) -> Messages:
"""Override to set final_env_response when answer is ready to avoid extra model call"""
tool_messages = await super().env_response(messages, state)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

env_response needs **kwargs, and it needs to pass them on to super().env_response(...).

if "final_answer" in state:
state["final_env_response"] = tool_messages
return tool_messages

# =========================================================================
# Stop Conditions
# =========================================================================
Expand Down
Loading