From 1c757d119d38dda7f59621200496e9befa582c50 Mon Sep 17 00:00:00 2001 From: Kye Date: Thu, 6 Jul 2023 14:00:53 -0400 Subject: [PATCH] worker tool node --- swarms/swarms.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/swarms/swarms.py b/swarms/swarms.py index d08f6bb7..cea2513a 100644 --- a/swarms/swarms.py +++ b/swarms/swarms.py @@ -42,7 +42,8 @@ class Swarms: llm = self.initialize_llm(ChatOpenAI) worker_node = WorkerNode(llm=llm, tools=worker_tools, vectorstore=vectorstore) worker_node.create_agent(ai_name="AI Assistant", ai_role="Assistant", human_in_the_loop=False, search_kwargs={}) - return worker_tool(name="WorkerNode AI Agent", func=worker_node.run, description="Useful for when you need to spawn an autonomous agent instance as a worker to accomplish complex tasks, it can search the internet or spawn child multi-modality models to process and generate images and text or audio and so on") + worker_node_tool = Tool(name="WorkerNode AI Agent", func=worker_node.run, description="Useful for when you need to spawn an autonomous agent instance as a worker to accomplish complex tasks, it can search the internet or spawn child multi-modality models to process and generate images and text or audio and so on") + return worker_node_tool def initialize_boss_node(self, vectorstore, worker_node): # Initialize boss node