orchestrator

pull/55/head
Kye 1 year ago
parent ee93b2f61c
commit 49f4f971b2

@ -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 ----------

@ -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,

@ -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')

Loading…
Cancel
Save