From a5c5b2da0574a5e90432f52142f4b6e1ef0b3561 Mon Sep 17 00:00:00 2001 From: Kye Date: Thu, 6 Jul 2023 19:30:17 -0400 Subject: [PATCH] new example --- README.md | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index adf2e46a..92692cc5 100644 --- a/README.md +++ b/README.md @@ -44,25 +44,14 @@ There are 2 methods, one is through `git clone` and the other is by `pip install ```python -from swarms import Swarms +from swarms import swarm -# Retrieve your API key from the environment or replace with your actual key -api_key = "sksdsds" +api_key = "api key for openai" -# Initialize Swarms with your API key -swarm = Swarms(openai_api_key=api_key) +objective = "What is the capital of the Uk" -# Define an objective -objective = """ -Please develop and serve a simple community web service. -People can signup, login, post, comment. -Post and comment should be visible at once. -I want it to have neumorphism-style. -The ports you can use are 4500 and 6500. -""" - -# Run Swarms -swarm.run_swarms(objective) +result = swarm(api_key, objective) +print(result) ``` # Method 2