From 510ed0008efab5eb03dc63be05ba578a704d5b9f Mon Sep 17 00:00:00 2001 From: Noah Shinn Date: Thu, 3 Aug 2023 23:11:19 -0700 Subject: [PATCH] fixes #19 --- alfworld_runs/alfworld_trial.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/alfworld_runs/alfworld_trial.py b/alfworld_runs/alfworld_trial.py index 2bdcf6f..998c729 100644 --- a/alfworld_runs/alfworld_trial.py +++ b/alfworld_runs/alfworld_trial.py @@ -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]) @@ -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():