chromadb requirements

Former-commit-id: cbfd897499
group-chat
Kye 1 year ago
parent 9416d06495
commit e39f1fba97

@ -19,8 +19,7 @@ google-generativeai
duckduckgo-search duckduckgo-search
shapeless shapeless
agent-protocol agent-protocol
chromadb
mkdocs mkdocs
mkdocs-material mkdocs-material

@ -17,10 +17,10 @@ class Orchestrator(ABC):
- task assignment, - task assignment,
- and task compeletion. - and task compeletion.
And, the communication for millions of agents to communicate with eachother through And, the communication for millions of agents to chat with eachother through
a vector database that each agent has access to communicate with. 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, communication layer. The orchestrator assigns tasks to each LLM agent,
which the agents then complete and return. which the agents then complete and return.
@ -221,13 +221,13 @@ class Orchestrator(ABC):
logging.error(f"An error occured in swarm: {e}") logging.error(f"An error occured in swarm: {e}")
return None return None
def communicate( def chat(
self, self,
sender_id: int, sender_id: int,
receiver_id: int, receiver_id: int,
message: str 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_vector = self.embed(
message, message,
@ -242,3 +242,9 @@ class Orchestrator(ABC):
ids=[f"{sender_id}_to_{receiver_id}"] ids=[f"{sender_id}_to_{receiver_id}"]
) )
orchestrate = Orchestrator()
orchestrate.chat(
sender_id=1,
receiver_id=2,
message="Hello, how are you "
)
Loading…
Cancel
Save