From 351240078edb14a22c6eb82a2c5762f1bfb7e065 Mon Sep 17 00:00:00 2001 From: Kye Date: Wed, 5 Jul 2023 23:49:29 -0400 Subject: [PATCH] clean upg --- swarms/agents/workers/worker.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/swarms/agents/workers/worker.py b/swarms/agents/workers/worker.py index 96d4c9b1..f15e5adf 100644 --- a/swarms/agents/workers/worker.py +++ b/swarms/agents/workers/worker.py @@ -1,23 +1,22 @@ from swarms.tools.agent_tools import * from langchain.tools import BaseTool from typing import Optional, Type + from langchain.callbacks.manager import ( AsyncCallbackManagerForToolRun, CallbackManagerForToolRun, ) from typing import List, Any - -# from langchain.memory.chat_message_histories import FileChatMessageHistory import logging - logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s') -@tool +@tool("WorkerNode") class WorkerNode: - name = "WorkerNode" - 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" + """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""" + # name = "WorkerNode" + # 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