From 4f4181bcb7a2c7b35b221f776e9aa7e7dbbb1570 Mon Sep 17 00:00:00 2001 From: Kye Date: Sun, 16 Jul 2023 22:49:05 -0400 Subject: [PATCH] transforming tools to tool dict Former-commit-id: 4799638c32f62473ca2d37fbd9f98f037f8ada41 --- swarms/agents/workers/worker_agent_ultra.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/swarms/agents/workers/worker_agent_ultra.py b/swarms/agents/workers/worker_agent_ultra.py index e82c8439..2502f771 100644 --- a/swarms/agents/workers/worker_agent_ultra.py +++ b/swarms/agents/workers/worker_agent_ultra.py @@ -43,10 +43,11 @@ class WorkerUltraNode: def create_agent(self, ai_name="Swarm Worker AI Assistant", ai_role="Assistant", human_in_the_loop=False, search_kwargs={}, verbose=False): logging.info("Creating agent in WorkerNode") try: + tools_dict = {type(tool).__name__: tool for tool in self.toolsets} self.agent = AutoGPT.from_llm_and_tools( ai_name=ai_name, ai_role=ai_role, - tools=self.toolsets, + tools=tools_dict, # Pass the dictionary instead of the list llm=self.llm, memory=self.vectorstore.as_retriever(search_kwargs=search_kwargs), human_in_the_loop=human_in_the_loop,