diff --git a/concurrent_workflow.py b/concurrent_workflow.py deleted file mode 100644 index ef8b19bc..00000000 --- a/concurrent_workflow.py +++ /dev/null @@ -1,30 +0,0 @@ -import os -from dotenv import load_dotenv -from swarms import OpenAIChat, Task, ConcurrentWorkflow, Agent - -# Load environment variables from .env file -load_dotenv() - -# Load environment variables -llm = OpenAIChat(openai_api_key=os.getenv("OPENAI_API_KEY")) -agent = Agent( - system_prompt=None, - llm=llm, - max_loops=1, -) - -# Create a workflow -workflow = ConcurrentWorkflow(max_workers=3) - -# Create tasks -task1 = Task(agent=agent, description="What's the weather in miami") -task2 = Task( - agent=agent, description="What's the weather in new york" -) -task3 = Task(agent=agent, description="What's the weather in london") - -# Add tasks to the workflow -workflow.add(tasks=[task1, task2, task3]) - -# Run the workflow and print each task result -workflow.run() diff --git a/pyproject.toml b/pyproject.toml index 4b8056d8..49f9306d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "swarms" -version = "3.5.0" +version = "3.5.2" description = "Swarms - Pytorch" license = "MIT" authors = ["Kye Gomez "] diff --git a/swarm_net.py b/swarm_net.py deleted file mode 100644 index c1a1d230..00000000 --- a/swarm_net.py +++ /dev/null @@ -1,46 +0,0 @@ -import os - -from dotenv import load_dotenv - -# Import the OpenAIChat model and the Agent struct -from swarms import OpenAIChat, Agent, SwarmNetwork - -# Load the environment variables -load_dotenv() - -# Get the API key from the environment -api_key = os.environ.get("OPENAI_API_KEY") - -# Initialize the language model -llm = OpenAIChat( - temperature=0.5, - openai_api_key=api_key, -) - -## Initialize the workflow -agent = Agent(llm=llm, max_loops=1, agent_name="Social Media Manager") -agent2 = Agent(llm=llm, max_loops=1, agent_name=" Product Manager") -agent3 = Agent(llm=llm, max_loops=1, agent_name="SEO Manager") - - -# Load the swarmnet with the agents -swarmnet = SwarmNetwork( - agents=[agent, agent2, agent3], -) - -# # List the agents in the swarm network -out = swarmnet.list_agents() -print(out) - -# Run the workflow on a task -out = swarmnet.run_single_agent( - agent.id, "Generate a 10,000 word blog on health and wellness." -) -print(out) - - -# Run all the agents in the swarm network on a task -out = swarmnet.run_many_agents( - "Generate a 10,000 word blog on health and wellness." -) -print(out)