From ca3fdb03bb986071269d28a8c22884f238f5c931 Mon Sep 17 00:00:00 2001 From: Kye Date: Wed, 5 Jul 2023 17:26:02 -0400 Subject: [PATCH] clean up auto agent --- swarms/agents/workers/auto_agent.py | 38 +++------------------------ swarms/agents/workers/worker_agent.py | 0 2 files changed, 3 insertions(+), 35 deletions(-) create mode 100644 swarms/agents/workers/worker_agent.py diff --git a/swarms/agents/workers/auto_agent.py b/swarms/agents/workers/auto_agent.py index eb1f97b9..147c6375 100644 --- a/swarms/agents/workers/auto_agent.py +++ b/swarms/agents/workers/auto_agent.py @@ -11,7 +11,7 @@ import asyncio import nest_asyncio # Tools -import os + from contextlib import contextmanager from typing import Optional from langchain.agents import tool @@ -47,8 +47,6 @@ class MultiModalVisualAgentTool(BaseTool): return self.agent.run_text(text) - - class WorkerAgent: def __init__(self, objective: str, api_key: str): self.objective = objective @@ -104,37 +102,7 @@ class WorkerAgent: # worker_agent = WorkerAgent(objective, api_key) +objective = "Your objective here" - - -# worker_agent = agent_worker -# tree_of_thoughts_prompt = """ - -# Imagine three different experts are answering this question. All experts will write down each chain of thought of each step of their thinking, then share it with the group. Then all experts will go on to the next step, etc. If any expert realises they're wrong at any point then they leave. The question is... - - -# """ - - -# #Input problem -# input_problem = """ - - -# Input: 2 8 8 14 -# Possible next steps: -# 2 + 8 = 10 (left: 8 10 14) -# 8 / 2 = 4 (left: 4 8 14) -# 14 + 2 = 16 (left: 8 8 16) -# 2 * 8 = 16 (left: 8 14 16) -# 8 - 2 = 6 (left: 6 8 14) -# 14 - 8 = 6 (left: 2 6 8) -# 14 / 2 = 7 (left: 7 8 8) -# 14 - 2 = 12 (left: 8 8 12) -# Input: use 4 numbers and basic arithmetic operations (+-*/) to obtain 24 in 1 equation -# Possible next steps: - - -# """ - -# agent.run([f"{tree_of_thoughts_prompt} {input_problem}"]) \ No newline at end of file +worker_agent = WorkerAgent(objective) diff --git a/swarms/agents/workers/worker_agent.py b/swarms/agents/workers/worker_agent.py new file mode 100644 index 00000000..e69de29b