From e39f1fba97662d1d9012642634869d110c4789ec Mon Sep 17 00:00:00 2001 From: Kye Date: Wed, 20 Sep 2023 09:49:58 -0400 Subject: [PATCH] chromadb requirements Former-commit-id: cbfd897499588f4cd9309b6ff71565e68cc7f0d3 --- requirements.txt | 3 +-- swarms/swarms/orchestrate.py | 16 +++++++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/requirements.txt b/requirements.txt index 6731034a..299474ea 100644 --- a/requirements.txt +++ b/requirements.txt @@ -19,8 +19,7 @@ google-generativeai duckduckgo-search shapeless agent-protocol - - +chromadb mkdocs mkdocs-material diff --git a/swarms/swarms/orchestrate.py b/swarms/swarms/orchestrate.py index a5d382fb..ccd29b7b 100644 --- a/swarms/swarms/orchestrate.py +++ b/swarms/swarms/orchestrate.py @@ -17,10 +17,10 @@ class Orchestrator(ABC): - task assignment, - and task compeletion. - And, the communication for millions of agents to communicate with eachother through - a vector database that each agent has access to communicate with. + And, the communication for millions of agents to chat with eachother through + a vector database that each agent has access to chat with. - Each LLM agent communicates with the orchestrator through a dedicated + Each LLM agent chats with the orchestrator through a dedicated communication layer. The orchestrator assigns tasks to each LLM agent, which the agents then complete and return. @@ -221,13 +221,13 @@ class Orchestrator(ABC): logging.error(f"An error occured in swarm: {e}") return None - def communicate( + def chat( self, sender_id: int, receiver_id: int, message: str ): - """Allows the agents to communicate with eachother thrught the vectordatabase""" + """Allows the agents to chat with eachother thrught the vectordatabase""" message_vector = self.embed( message, @@ -242,3 +242,9 @@ class Orchestrator(ABC): ids=[f"{sender_id}_to_{receiver_id}"] ) +orchestrate = Orchestrator() +orchestrate.chat( + sender_id=1, + receiver_id=2, + message="Hello, how are you " +) \ No newline at end of file