From 5d1b0ddde5ea569da8cf789bf36458474b467ffc Mon Sep 17 00:00:00 2001 From: Kye Date: Sat, 29 Jul 2023 17:28:20 -0400 Subject: [PATCH] clean up --- swarms/workers/worker_node.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/swarms/workers/worker_node.py b/swarms/workers/worker_node.py index e92c0578..f6bf3d0f 100644 --- a/swarms/workers/worker_node.py +++ b/swarms/workers/worker_node.py @@ -137,6 +137,9 @@ class WorkerNode: self.openai_api_key = openai_api_key self.worker_node_initializer = WorkerNodeInitializer(openai_api_key) + self.name = worker_name # Added a name attribute + self.description = "A worker node that executes tasks" # Added a description attribute + def initialize_llm(self, llm_class, temperature): if not llm_class: @@ -190,6 +193,7 @@ class WorkerNode: human_in_the_loop=human_in_the_loop, search_kwargs=search_kwargs, ) + worker_node.name = worker_name # Setting the name here return worker_node except Exception as e: logging.error(f"Failed to create worker node: {e}")