"""Useful for when you need to spawn an autonomous agent instance as a agent 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):
def__init__(self,
llm,
tools,
vectorstore,
temperature,
model_type:str=None,
human_in_the_loop=True,
model_id:str=None,
embedding_size:int=8192,
system_prompt:str=None,
max_iterations:int=None):
ifnotllmornottoolsornotvectorstore:
logging.error("llm, tools, and vectorstore cannot be None.")
raiseValueError("llm, tools, and vectorstore cannot be None.")
@ -27,9 +37,23 @@ class AgentNodeInitializer:
self.llm=llm
self.tools=tools
self.vectorstore=vectorstore
self.agent=None
self.temperature=temperature
self.model_type=model_type
self.human_in_the_loop=human_in_the_loop
self.prompt=prompt
self.model_id=model_id
self.embedding_size=embedding_size
self.system_promptsystem_prompt
defcreate_agent(self,ai_name="Swarm Agent AI Assistant",ai_role="Assistant",human_in_the_loop=False,search_kwargs={},verbose=False):
defcreate_agent(self,ai_name="Swarm Agent AI Assistant",ai_role="Assistant",human_in_the_loop=True,search_kwargs={},verbose=False):