From ace9031261e1f96d53d307cda3aeec86bb28bf8a Mon Sep 17 00:00:00 2001 From: Kye Date: Tue, 4 Jul 2023 13:19:34 -0400 Subject: [PATCH] clean up --- README.md | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index caeee8e5..8f3453a7 100644 --- a/README.md +++ b/README.md @@ -41,15 +41,19 @@ There are 2 methods, one is through `git clone` and the other is by `pip install ```python -from swarms import boss_node +from swarms import Swarms -#create a task -task = boss_node.create_task(objective="Write a research paper on the impact of climate change on global agriculture") +# Retrieve your API key from the environment or replace with your actual key +api_key = "api key" -#or -# task = boss_node.create_task('Find a video of Elon Musk and make him look like a cat') +# Initialize Swarms with your API key +swarm = Swarms(openai_api_key=api_key) -boss_node.execute(task) +# Define an objective +objective = "Find 20 potential customers for a Swarms based AI Agent automation infrastructure" + +# Run Swarms +swarm.run_swarms(objective) ``` # Method2 @@ -85,11 +89,19 @@ class BossNode: With the `BossNode` class, you can create tasks for your tools to perform. For example, you can create a task to write a summary of a specific topic: ```python -from swarms import boss_node -#create a task -task = boss_node.create_task(objective="Write a research paper on the impact of climate change on global agriculture") -#execute the teask -boss_node.execute_task(task) +from swarms import Swarms + +# Retrieve your API key from the environment or replace with your actual key +api_key = "api key" + +# Initialize Swarms with your API key +swarm = Swarms(openai_api_key=api_key) + +# Define an objective +objective = "Find 20 potential customers for a Swarms based AI Agent automation infrastructure" + +# Run Swarms +swarm.run_swarms(objective) ```