Skip to content

Commit

Permalink
update memory
Browse files Browse the repository at this point in the history
  • Loading branch information
Jing Yuan Thong committed Aug 23, 2024
1 parent 6917317 commit ebf0683
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webshop/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ def generate_embeddings(memory):
continue
# extract embeddings
embeddings[key] = model_embedding.encode(retrieve_info)
return embeddings
return memory, embeddings


def generate_examples(info, actions, memory, embeddings, reasoning='', k=3, act_len=0, use_act_obs=False):
Expand Down Expand Up @@ -558,7 +558,7 @@ def webshop_run_rap(idx, prompt, memory, embeddings, to_print=True):
sr_games = []
if trial != 0:
memory = current_memory[:]
embeddings = generate_embeddings(memory)
memory, embeddings = generate_embeddings(memory)
current_memory = []
for i in range(start, start+n):
print('-----------------')
Expand Down

0 comments on commit ebf0683

Please sign in to comment.