You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
from swarms . models import OpenAIChat
from swarms import Worker
api_key = " "
llm = OpenAIChat (
openai_api_key = api_key ,
temperature = 0.5 ,
)
node = Worker (
llm = llm ,
ai_name = " Optimus Prime " ,
openai_api_key = api_key ,
ai_role = " Worker in a swarm " ,
external_tools = None ,
human_in_the_loop = False ,
temperature = 0.5 ,
)
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 )