Skip to content

Commit 89cbaa9

Browse files
committed
fix: alfworld rollout prompt
1 parent ecc1e7e commit 89cbaa9

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

openmanus_rl/environments/env_manager.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,11 @@ def build_text_obs(self, text_obs: List[str], admissible_actions: List[List[str]
107107
reformatted_admissible_actions = "\n ".join(f"'{s}'" for s in admissible_actions[i] if s != 'help')
108108

109109
if init or self.config.env.history_length <= 0:
110+
# Include task_description to satisfy ALFWORLD_TEMPLATE_NO_HIS placeholders.
110111
obs = ALFWORLD_TEMPLATE_NO_HIS.format(
112+
task_description=self.tasks[i],
111113
current_observation=text_obs[i],
112-
admissible_actions=reformatted_admissible_actions
114+
admissible_actions=reformatted_admissible_actions,
113115
)
114116
else:
115117
obs = ALFWORLD_TEMPLATE.format(

openmanus_rl/environments/prompts/alfworld.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Your admissible actions of the current situation are: [{admissible_actions}].
66

77
# Now it's your turn to take an action.
8-
# You should first reason step-by-step about the current situation. This reasoning process MUST be enclosed within <think> </think> tags.
8+
# You should first reason step-by-step about the current situation. This reasoning process MUST be enclosed within <plan> </plan> tags.
99
# Once you've finished your reasoning, you should choose an admissible action for current step and present it within <action> </action> tags.
1010
# """
1111

@@ -54,7 +54,7 @@
5454
- Am I making progress toward the task goal?
5555
</reflection>
5656
57-
After that, you should plan the next step based on memory and reflection, then MUST summarize within <think> </think> tags like this:
57+
After that, you should plan the next step based on memory and reflection, then MUST summarize within <plan> </plan> tags like this:
5858
5959
<plan>
6060
[Plan the next step based on memory and reflection]

0 commit comments

Comments
 (0)