File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 14
14
from IPython .display import display
15
15
from tqdm import tqdm
16
16
17
- from agentlab .experiments .exp_utils import RESULTS_DIR
18
-
19
17
# TODO find a more portable way to code set_task_category_as_index at least
20
18
# handle dynamic imports. We don't want to always import workarena
21
19
# from browsergym.workarena import TASK_CATEGORY_MAP
Original file line number Diff line number Diff line change 6
6
from pathlib import Path
7
7
from time import sleep , time
8
8
9
- from browsergym .experiments .loop import ExpArgs , _move_old_exp , yield_all_exp_results
9
+ from browsergym .experiments .loop import ExpArgs , yield_all_exp_results
10
10
from tqdm import tqdm
11
11
12
12
logger = logging .getLogger (__name__ ) # Get logger based on module name
Original file line number Diff line number Diff line change @@ -126,9 +126,13 @@ def retry_multiple(
126
126
"""
127
127
tries = 0
128
128
while tries < n_retry :
129
- answer_list = chat (messages , num_samples = num_samples )
129
+ answer_list = chat (messages , n_samples = num_samples )
130
130
# TODO: could we change this to not use inplace modifications ?
131
- messages .append (answer )
131
+ if not isinstance (answer_list , list ):
132
+ answer_list = [answer_list ]
133
+
134
+ # TODO taking the 1st hides the other generated answers in AgentXRay
135
+ messages .append (answer_list [0 ])
132
136
parsed_answers = []
133
137
errors = []
134
138
for answer in answer_list :
You can’t perform that action at this time.
0 commit comments