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.
Disable memory creation
Reinier van der Leer5bfccd800e20
diff --git a/autogpt/commands/file_operations.py b/autogpt/commands/file_operations.pyindex 83d607057e..1750dbde71 100644--- a/autogpt/commands/file_operations.py+++ b/autogpt/commands/file_operations.py@@ -155,10 +155,10 @@ def read_file(filename: Path, agent: Agent) -> str:"""content = read_textual_file(filename, logger)- # TODO: invalidate/update memory when file is edited- file_memory = MemoryItem.from_text_file(content, str(filename), agent.config)- if len(file_memory.chunks) > 1:- return file_memory.summary+ # # TODO: invalidate/update memory when file is edited+ # file_memory = MemoryItem.from_text_file(content, str(filename), agent.config)+ # if len(file_memory.chunks) > 1:+ # return file_memory.summaryreturn contentdiff --git a/autogpt/commands/web_selenium.py b/autogpt/commands/web_selenium.pyindex 212b1bb44b..c47ab360bf 100644--- a/autogpt/commands/web_selenium.py+++ b/autogpt/commands/web_selenium.py@@ -40,8 +40,8 @@ if TYPE_CHECKING:from autogpt.agents.utils.exceptions import CommandExecutionErrorfrom autogpt.command_decorator import commandfrom autogpt.llm.utils import count_string_tokens-from autogpt.memory.vector import MemoryItem, get_memoryfrom autogpt.processing.html import extract_hyperlinks, format_hyperlinks+from autogpt.processing.text import summarize_textfrom autogpt.url_utils.validators import validate_urllogger = logging.getLogger(__name__)@@ -271,8 +271,10 @@ def summarize_memorize_webpage(text_length = len(text)logger.info(f"Text length: {text_length} characters")- memory = get_memory(agent.config)+ # memory = get_memory(agent.config)- new_memory = MemoryItem.from_webpage(text, url, agent.config, question=question)- memory.add(new_memory)- return new_memory.summary+ # new_memory = MemoryItem.from_webpage(text, url, agent.config, question=question)+ # memory.add(new_memory)++ summary, _ = summarize_text(text, question=question, config=agent.config)+ return summary