new example

pull/160/head
Kye 2 years ago
parent 0483226886
commit a5c5b2da05

@ -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

Loading…
Cancel
Save