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
|
|
|
|
from swarms.prompts import PRODUCT_AGENT_PROMPT
|
|
|
|
|
|
|
|
api_key = "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"
|
|
|
|
|
|
|
|
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=PRODUCT_AGENT_PROMPT,
|
|
|
|
external_tools=None,
|
|
|
|
human_in_the_loop=False,
|
|
|
|
temperature=0.5,
|
|
|
|
)
|
|
|
|
|
|
|
|
task = "Create an entirely new board game around riddles for physics"
|
|
|
|
response = node.run(task)
|
|
|
|
print(response)
|