From b8707bbf64fbcf5fe9ba9b729a135c159124195a Mon Sep 17 00:00:00 2001 From: Kye Date: Thu, 13 Jul 2023 12:54:48 -0400 Subject: [PATCH] worker ultra example Former-commit-id: 51cdc4698526da6cd444c5b8dbc0a566c5d028f0 --- playground/worker_ultra.py | 22 +++++++++++++++++++--- swarms/agents/.DS_Store | Bin 0 -> 6148 bytes 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 swarms/agents/.DS_Store diff --git a/playground/worker_ultra.py b/playground/worker_ultra.py index 55d5492b..8817451d 100644 --- a/playground/worker_ultra.py +++ b/playground/worker_ultra.py @@ -1,5 +1,21 @@ +import os from swarms import WorkerUltra -objective = "What is the capital of the UK?" -result = WorkerUltra(objective) -print(result) # Prints: "The capital of the UK is London." \ No newline at end of file +api_key = os.getenv("OPENAI_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. + +""" + +node = WorkerUltra(objective, openai_api_key=api_key) + + +result = node.execute() \ No newline at end of file diff --git a/swarms/agents/.DS_Store b/swarms/agents/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..26c154e2727ff8c63d16b48d252a6395506fc4d3 GIT binary patch literal 6148 zcmeHKI|>3Z5S{S@f{mqRuHX%V=n3`$7J>+(;IH1wb9pr1e41sk(?WRzlb1~9CFB)5 zJ0haX+jb!`6OjqrP#!k)&GyZEHpqwq;W*=RZ_dZV>A36Vz6%(4EH}BzUJf0;?a-(I z6`%rCfC^B7Pb-iWb~63+!90%&P=TLUz`hR!ZdeoBK>u`L@D>0#Lf8#+?GNs z1|kB}paO%c*+Nm*NakF#1^;2XH*JmF@TI|YN6W1yE~EUX;QJt^{v&9Pq- U+d!uy?sOo3222+k75KISF9lB&>Hq)$ literal 0 HcmV?d00001