orchestrator

Former-commit-id: 9b93ebe96a77e2fe6898b54db2190b85adc98f70
pull/160/head
Kye 2 years ago
parent 4fb242b2b6
commit e3b79da251

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