From 5e6fcceb6ee2bef5b91f20b2ff3499fd0410fbbc Mon Sep 17 00:00:00 2001 From: Kye Date: Wed, 5 Jul 2023 23:46:49 -0400 Subject: [PATCH] new tool method --- swarms/agents/workers/worker.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/swarms/agents/workers/worker.py b/swarms/agents/workers/worker.py index 3797c28c..96d4c9b1 100644 --- a/swarms/agents/workers/worker.py +++ b/swarms/agents/workers/worker.py @@ -14,9 +14,10 @@ import logging logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s') -class WorkerNode(BaseTool): +@tool +class WorkerNode: name = "WorkerNode" - description = "A worker node that can perform complex tasks" + 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" # llm: ChatOpenAI # add this line # tools: List[Tool] # vectorstore: VectorStore @@ -48,7 +49,7 @@ class WorkerNode(BaseTool): ) self.agent.chain.verbose = True - @tool("perform_task") + # @tool("perform_task") def _run( self, prompt: str, run_manager: Optional[CallbackManagerForToolRun] = None ) -> str: