diff --git a/index.py b/index.py new file mode 100644 index 0000000..ca367e5 --- /dev/null +++ b/index.py @@ -0,0 +1,21 @@ +import time +from jarvis.enviroment.base_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' + ] + + # environment.init_env() + for a in action: + print(a) + command = agent.action_lib[a] + print(agent.env.step(command)) + time.sleep(2)