mirror of
https://github.com/OS-Copilot/OS-Copilot.git
synced 2026-05-05 03:00:15 -04:00
23 lines
563 B
Python
23 lines
563 B
Python
import time
|
|
from jarvis.environment.old_env import BaseEnviroment
|
|
from jarvis.agent.openai_agent import OpenAIAgent
|
|
|
|
if __name__ == '__main__':
|
|
environment = BaseEnviroment()
|
|
agent = OpenAIAgent(
|
|
config_path="examples/config.json",
|
|
environment=environment
|
|
)
|
|
action = [
|
|
'turn_on_dark_mode',
|
|
'turn_on_light_mode'
|
|
# 'mac_set_brightness'
|
|
]
|
|
|
|
# environment.init_env()
|
|
for a in action:
|
|
print(a)
|
|
command = agent.action_lib[a]
|
|
print(agent.env.step(command))
|
|
time.sleep(2)
|