worker_name:Optional[str]="Swarm Worker AI Assistant",
verbose:Optional[bool]=False,
human_in_the_loop:Optional[bool]=True,
boss_prompt:Optional[str]="You are an Boss in a swarm who performs one task based on the following objective: {objective}. Take into account these previously completed tasks: {context}.\n",
@ -64,6 +65,9 @@ class HierarchicalSwarm:
self.max_iterations=max_iterations
self.logging_enabled=logging_enabled
self.verbose=verbose
self.logger=logging.getLogger()
ifnotlogging_enabled:
self.logger.disabled=True
@ -143,7 +147,7 @@ class HierarchicalSwarm:
logging.error(f"Failed to initialize worker node: {e}")
"""Useful for when you need to spawn an autonomous agent instance as a worker to accomplish complex tasks, it can search the internet or spawn child multi-modality models to process and generate images and text or audio and so on"""
def__init__(self,llm,tools,vectorstore):
ifnotllmornottoolsornotvectorstore:
logging.error("llm, tools, and vectorstore cannot be None.")
raiseValueError("llm, tools, and vectorstore cannot be None.")