diff --git a/execution.py b/execution.py index 82af468bb..44e9ccf95 100644 --- a/execution.py +++ b/execution.py @@ -399,6 +399,9 @@ class PromptExecutor: if self.success is not True: self.handle_execution_error(prompt_id, prompt, current_outputs, executed, error, ex) break + else: + # Only execute when while ends without break + self.add_message("execution_end", { "prompt_id": prompt_id }, broadcast=False) for x in executed: self.old_prompt[x] = copy.deepcopy(prompt[x])