clean up in init boss mode

pull/160/head
Kye 2 years ago
parent b14aee130b
commit 107dde8b55

@ -60,7 +60,9 @@ class Swarms:
llm_chain = LLMChain(llm=llm, prompt=prompt) llm_chain = LLMChain(llm=llm, prompt=prompt)
agent = ZeroShotAgent(llm_chain=llm_chain, allowed_tools=[tool.name for tool in tools]) agent = ZeroShotAgent(llm_chain=llm_chain, allowed_tools=[tool.name for tool in tools])
agent_executor = AgentExecutor.from_agent_and_tools(agent=agent, tools=tools, verbose=True) agent_executor = AgentExecutor.from_agent_and_tools(agent=agent, tools=tools, verbose=True)
return BossNode(self.openai_api_key, llm, vectorstore, agent_executor, max_iterations=5) # return BossNode(return BossNode(llm, vectorstore, agent_executor, max_iterations=5)
return BossNode(llm, vectorstore, agent_executor, max_iterations=5)
def run_swarms(self, objective): def run_swarms(self, objective):
try: try:

Loading…
Cancel
Save