main
Kye 2 years ago
parent c936aaa82e
commit 0966bce54f

@ -10,12 +10,12 @@ class WorkerNode(BaseTool):
"""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 """ """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 """
name = "WorkerNode" name = "WorkerNode"
description = "A worker node that can perform complex tasks" description = "A worker node that can perform complex tasks"
llm: Any = Field(description="Language model")
tools: List[Tool] = Field(description="List of tools") def __init__(self, llm, tools, vectorstore):
vectorstore: VectorStore = Field(description="Vector store") super().__init__()
self.llm = llm
def __init__(self, **data): self.tools = tools
super().__init__(**data) self.vectorstore = vectorstore
def create_agent(self, ai_name, ai_role, human_in_the_loop, search_kwargs): def create_agent(self, ai_name, ai_role, human_in_the_loop, search_kwargs):
self.agent = AutoGPT.from_llm_and_tools( self.agent = AutoGPT.from_llm_and_tools(

Loading…
Cancel
Save