From dc6c5428ff9ceb07dbcfbea914ca72797e4d995d Mon Sep 17 00:00:00 2001 From: LeonOstrez Date: Tue, 19 Nov 2024 12:47:01 +0100 Subject: [PATCH] extra fix for situation when action is None --- core/agents/mixins.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/agents/mixins.py b/core/agents/mixins.py index cb02fc6a9f..10c42454ff 100644 --- a/core/agents/mixins.py +++ b/core/agents/mixins.py @@ -111,6 +111,9 @@ class RelevantFilesMixin: while not done and len(convo.messages) < 13: llm_response: RelevantFiles = await llm(convo, parser=JSONParser(RelevantFiles), temperature=0) action = llm_response.action + if action is None: + convo.remove_last_x_messages(2) + continue # Check if there are files to add to the list if getattr(action, "add_files", None):