Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

Prevent needless double LLM calls when SMART_LLM == FAST_LLM

Reinier van der Leerb486c621eb63
diff --git a/autogpt/agents/features/watchdog.py b/autogpt/agents/features/watchdog.py
index 850999fdf2..caddf195c5 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 (