diff --git a/swarms/agents/workers/worker.py b/swarms/agents/workers/worker.py index ff071d0e..0e874230 100644 --- a/swarms/agents/workers/worker.py +++ b/swarms/agents/workers/worker.py @@ -7,6 +7,8 @@ from langchain.callbacks.manager import ( ) # +from langchain.memory.chat_message_histories import FileChatMessageHistory + class WorkerNode(BaseTool): name = "WorkerNode" @@ -27,6 +29,7 @@ class WorkerNode(BaseTool): llm=self.llm, memory=self.vectorstore.as_retriever(search_kwargs=search_kwargs), human_in_the_loop=human_in_the_loop, + chat_history_memory=FileChatMessageHistory("chat_history.txt"), ) self.agent.chain.verbose = True diff --git a/swarms/swarms.py b/swarms/swarms.py index 5745340d..83b730a5 100644 --- a/swarms/swarms.py +++ b/swarms/swarms.py @@ -4,7 +4,6 @@ from swarms.agents.boss.boss_agent import BossNode # from swarms.agents.workers.omni_worker import OmniWorkerAgent - class Swarms: def __init__(self, openai_api_key,