From be9daed67fb9222171a3f56c433a258870e76feb Mon Sep 17 00:00:00 2001 From: Reinier van der Leer Date: Mon, 24 Jun 2024 20:23:56 -0700 Subject: [PATCH] add config back to Agent.history init --- autogpt/autogpt/agents/agent.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/autogpt/autogpt/agents/agent.py b/autogpt/autogpt/agents/agent.py index e6d62f0b4dc..58c11858605 100644 --- a/autogpt/autogpt/agents/agent.py +++ b/autogpt/autogpt/agents/agent.py @@ -18,6 +18,7 @@ ActionHistoryComponent, EpisodicActionHistory, ) +from forge.components.action_history.action_history import ActionHistoryConfiguration from forge.components.code_executor.code_executor import ( CodeExecutorComponent, CodeExecutorConfiguration, @@ -115,6 +116,9 @@ def __init__( settings.history, lambda x: self.llm_provider.count_tokens(x, self.llm.name), llm_provider, + ActionHistoryConfiguration( + model_name=app_config.fast_llm, max_tokens=self.send_token_limit + ) ) .run_after(WatchdogComponent) .run_after(SystemComponent)