From b486c621eb63acaa4bd05a26644625a35a0cc145 Mon Sep 17 00:00:00 2001 From: Reinier van der Leer Date: Thu, 31 Aug 2023 01:42:49 +0200 Subject: [PATCH] Prevent needless double LLM calls when SMART_LLM == FAST_LLM --- autogpt/agents/features/watchdog.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/autogpt/agents/features/watchdog.py b/autogpt/agents/features/watchdog.py index 850999fd..caddf195 100644 --- a/autogpt/agents/features/watchdog.py +++ b/autogpt/agents/features/watchdog.py @@ -32,7 +32,11 @@ class WatchdogMixin: *args, **kwargs ) - if not self.big_brain and len(self.event_history) > 1: + if ( + not self.big_brain + and len(self.event_history) > 1 + and self.config.fast_llm != self.config.smart_llm + ): # Detect repetitive commands previous_cycle = self.event_history.cycles[self.event_history.cursor - 1] if (