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.
23 lines
771 B
23 lines
771 B
import os
|
|
from dotenv import load_dotenv
|
|
from swarms.models.revgptV4 import RevChatGPTModel
|
|
from swarms.workers.worker import Worker
|
|
|
|
load_dotenv()
|
|
|
|
config = {
|
|
"model": os.getenv("REVGPT_MODEL"),
|
|
"plugin_ids": [os.getenv("REVGPT_PLUGIN_IDS")],
|
|
"disable_history": os.getenv("REVGPT_DISABLE_HISTORY") == "True",
|
|
"PUID": os.getenv("REVGPT_PUID"),
|
|
"unverified_plugin_domains": [os.getenv("REVGPT_UNVERIFIED_PLUGIN_DOMAINS")],
|
|
}
|
|
|
|
llm = RevChatGPTModel(access_token=os.getenv("ACCESS_TOKEN"), **config)
|
|
|
|
worker = Worker(ai_name="Optimus Prime", llm=llm)
|
|
|
|
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 = worker.run(task)
|
|
print(response)
|