From 49f4f971b250cfb702936008227a46e7ed633001 Mon Sep 17 00:00:00 2001 From: Kye Date: Wed, 20 Sep 2023 09:57:08 -0400 Subject: [PATCH] orchestrator --- swarms/boss/boss_node.py | 2 -- swarms/swarms/orchestrate.py | 10 ++++++---- swarms/swarms/swarms.py | 1 - 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/swarms/boss/boss_node.py b/swarms/boss/boss_node.py index 4e3f9c95..4ee483b8 100644 --- a/swarms/boss/boss_node.py +++ b/swarms/boss/boss_node.py @@ -11,8 +11,6 @@ from langchain.vectorstores import FAISS from langchain_experimental.autonomous_agents import BabyAGI from pydantic import ValidationError - - logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') # ---------- Boss Node ---------- diff --git a/swarms/swarms/orchestrate.py b/swarms/swarms/orchestrate.py index ac196f0e..7eee9a27 100644 --- a/swarms/swarms/orchestrate.py +++ b/swarms/swarms/orchestrate.py @@ -1,12 +1,13 @@ import logging import queue import threading -from abc import ABC, abstractmethod +# from abc import ABC, abstractmethod from concurrent.futures import ThreadPoolExecutor from typing import Any, Dict, List import chromadb from chromadb.utils import embedding_functions +from swarms.workers.worker import Worker class Orchestrator: @@ -180,7 +181,10 @@ class Orchestrator: """Retrieve the vector database""" return self.collection - def append_to_db(self, result: str): + def append_to_db( + self, + result: str + ): """append the result of the swarm to a specifici collection in the database""" try: @@ -242,8 +246,6 @@ class Orchestrator: ids=[f"{sender_id}_to_{receiver_id}"] ) -from swarms.workers.worker import Worker - orchestrate = Orchestrator( Worker, Worker, diff --git a/swarms/swarms/swarms.py b/swarms/swarms/swarms.py index 6663c75d..1e311a2b 100644 --- a/swarms/swarms/swarms.py +++ b/swarms/swarms/swarms.py @@ -5,7 +5,6 @@ from typing import Optional from langchain import OpenAI from swarms.boss.boss_node import Boss -# from swarms.workers.worker_node import WorkerNode from swarms.workers.worker import Worker logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')