From f07487a7784ae519d624d55047894a0b5212b840 Mon Sep 17 00:00:00 2001 From: Kye Date: Sat, 23 Sep 2023 23:30:47 -0400 Subject: [PATCH] worker --- swarms/workers/worker.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/swarms/workers/worker.py b/swarms/workers/worker.py index 6b492e35..95499638 100644 --- a/swarms/workers/worker.py +++ b/swarms/workers/worker.py @@ -37,6 +37,20 @@ class Worker: - `openai` (bool): If True, use the OpenAI language model; otherwise, use `llm` (default: True). + #Usage + ``` + from swarms import Worker + + node = Worker( + ai_name="Optimus Prime", + + ) + + task = "What were the winning boston marathon times for the past 5 years (ending in 2022)? Generate a table of the year, name, country of origin, and times." + response = node.run(task) + print(response) + ``` + """ @log_decorator @error_decorator