We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da8208f commit e124feaCopy full SHA for e124fea
src/agentlab/llm/llm_utils.py
@@ -136,6 +136,10 @@ def retry_multiple(
136
parsed_answers.append(parser(answer["content"]))
137
except ParseError as parsing_error:
138
errors.append(str(parsing_error))
139
+ # if we have a valid answer, return it
140
+ if parsed_answers:
141
+ return parsed_answers, tries
142
+ else:
143
tries += 1
144
if log:
145
msg = f"Query failed. Retrying {tries}/{n_retry}.\n[LLM]:\n{answer['content']}\n[User]:\n{str(errors)}"
0 commit comments