From 535cb42d4cdd8c352b29177109c9a5eaef74f73b Mon Sep 17 00:00:00 2001 From: huchenlei Date: Sun, 21 Jul 2024 15:09:31 -0400 Subject: [PATCH] Add execution_end message --- execution.py | 3 +++ 1 file changed, 3 insertions(+) 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])