From e747a7903da15313624d280dbcdfd61b129c847f Mon Sep 17 00:00:00 2001 From: Kye Date: Sat, 22 Jul 2023 11:51:53 -0400 Subject: [PATCH] clean up --- swarms/agents/workers/WorkerNode.py | 4 ++-- swarms/swarms.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/swarms/agents/workers/WorkerNode.py b/swarms/agents/workers/WorkerNode.py index d83d8092..a6db11c6 100644 --- a/swarms/agents/workers/WorkerNode.py +++ b/swarms/agents/workers/WorkerNode.py @@ -15,7 +15,7 @@ logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %( from swarms.agents.tools.main import Terminal -class WorkerNode: +class WorkerNodeInitializer: """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""" def __init__(self, llm, tools, vectorstore): @@ -73,7 +73,7 @@ class WorkerNode: -class WorkerNodeInitializer: +class WorkerNode: def __init__(self, openai_api_key): if not openai_api_key: logging.error("OpenAI API key is not provided") diff --git a/swarms/swarms.py b/swarms/swarms.py index de82bc64..de0e0aa1 100644 --- a/swarms/swarms.py +++ b/swarms/swarms.py @@ -3,7 +3,7 @@ import asyncio # from swarms.agents.tools.agent_tools import * from swarms.agents.tools.agent_tools import * -from swarms.agents.workers.WorkerNode import WorkerNode, worker_node +from swarms.agents.workers.WorkerNode import WorkerNodeInitializer, worker_node from swarms.agents.boss.BossNode import BossNodeInitializer as BossNode from swarms.agents.workers.worker_ultra_node import WorkerUltra @@ -103,7 +103,7 @@ class Swarms: # Initialize worker node llm = self.initialize_llm(ChatOpenAI) - worker_node = WorkerNode(llm=llm, tools=worker_tools, vectorstore=vectorstore) + worker_node = WorkerNodeInitializer(llm=llm, tools=worker_tools, vectorstore=vectorstore) worker_node.create_agent(ai_name=ai_name, ai_role="Assistant", human_in_the_loop=False, search_kwargs={}) # add search kwargs worker_node_tool = Tool(name="WorkerNode AI Agent", func=worker_node.run, description="Input: an objective with a todo list for that objective. Output: your task completed: Please be very clear what the objective and task instructions are. The Swarm worker agent is Useful for when you need to spawn an autonomous agent instance as a worker to accomplish any complex tasks, it can search the internet or write code or spawn child multi-modality models to process and generate images and text or audio and so on")