Skip to content

Commit

Permalink
fixes #19
Browse files Browse the repository at this point in the history
  • Loading branch information
noahshinn committed Aug 4, 2023
1 parent 59c84d9 commit 510ed00
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions alfworld_runs/alfworld_trial.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ def alfworld_run(env, base_prompt, memory: List[str], to_print=True, ob='', mode
print(ob)
sys.stdout.flush()
cur_step = 0
while cur_step < 50:
# action = llm(init_prompt + prompt, stop=['\n']).strip()
while cur_step < 49:
action = llm(str(env_history) + ">", stop=['\n']).strip()
env_history.add("action", action)
observation, reward, done, info = env.step([action])
Expand All @@ -69,7 +68,6 @@ def alfworld_run(env, base_prompt, memory: List[str], to_print=True, ob='', mode
if to_print:
print(f'> {action}\n{observation}')
sys.stdout.flush()
# prompt += f' {action}\n{observation}\n>'
if done:
return env_history, True
elif env_history.check_is_exhausted():
Expand Down

0 comments on commit 510ed00

Please sign in to comment.