From a0e83e77ee0084d03b932027bb979860a19d6235 Mon Sep 17 00:00:00 2001 From: Kye Date: Tue, 4 Jul 2023 13:51:26 -0400 Subject: [PATCH] example --- playground/gui_app.py | 23 +++++++++++++++++++++++ playground/social_app.py | 22 ++++++++++++++++++++++ playground/todo_app.py | 20 ++++++++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 playground/gui_app.py create mode 100644 playground/social_app.py create mode 100644 playground/todo_app.py diff --git a/playground/gui_app.py b/playground/gui_app.py new file mode 100644 index 00000000..70de7b80 --- /dev/null +++ b/playground/gui_app.py @@ -0,0 +1,23 @@ +from swarms import Swarms + + +# Retrieve your API key from the environment or replace with your actual key +api_key = "sksdsds" + +# Initialize Swarms with your API key +swarm = Swarms(openai_api_key=api_key) + +# Define an objective +objective = """ +Please make a web GUI for using HTTP API server. +The name of it is Swarms. +You can check the server code at ./main.py. +The server is served on localhost:8000. +Users should be able to write text input as 'query' and url array as 'files', and check the response. +Users input form should be delivered in JSON format. +I want it to have neumorphism-style. Serve it on port 4500. + +""" + +# Run Swarms +swarm.run_swarms(objective) \ No newline at end of file diff --git a/playground/social_app.py b/playground/social_app.py new file mode 100644 index 00000000..9bacb615 --- /dev/null +++ b/playground/social_app.py @@ -0,0 +1,22 @@ +from swarms import Swarms + + +# Retrieve your API key from the environment or replace with your actual key +api_key = "sksdsds" + +# Initialize Swarms with your API key +swarm = Swarms(openai_api_key=api_key) + +# 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) \ No newline at end of file diff --git a/playground/todo_app.py b/playground/todo_app.py new file mode 100644 index 00000000..5162ce33 --- /dev/null +++ b/playground/todo_app.py @@ -0,0 +1,20 @@ +from swarms import Swarms + + +# Retrieve your API key from the environment or replace with your actual key +api_key = "sksdsds" + +# Initialize Swarms with your API key +swarm = Swarms(openai_api_key=api_key) + +# Define an objective +objective = """ +Please develop and serve a simple web TODO app. +The user can list all TODO items and add or delete each TODO item. +I want it to have neumorphism-style. +The ports you can use are 4500 and 6500. + +""" + +# Run Swarms +swarm.run_swarms(objective) \ No newline at end of file