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.
21 lines
527 B
21 lines
527 B
1 year ago
|
from swarms.models.bing_chat import EdgeGPTModel
|
||
|
from swarms.workers.worker import Worker
|
||
1 year ago
|
from swarms.tools.tool import EdgeGPTTool
|
||
1 year ago
|
|
||
|
# Initialize the EdgeGPTModel
|
||
1 year ago
|
edgegpt = EdgeGPTModel(cookies_path="./cookies.txt")
|
||
1 year ago
|
|
||
|
# Initialize the custom tool
|
||
|
edgegpt_tool = EdgeGPTTool(edgegpt)
|
||
|
|
||
|
# Initialize the Worker with the custom tool
|
||
|
worker = Worker(
|
||
|
ai_name="EdgeGPT Worker",
|
||
|
external_tools=[edgegpt_tool],
|
||
|
)
|
||
|
|
||
|
# Use the worker to process a task
|
||
|
task = "Hello, my name is ChatGPT"
|
||
|
response = worker.run(task)
|
||
|
print(response)
|