()
| 546 | openai.api_key = os.environ.get("OPENAI_API_KEY") |
| 547 | |
| 548 | def print_help(): |
| 549 | print( |
| 550 | "(g) to visit url\n(u) scroll up\n(d) scroll down\n(c) to click\n(t) to type\n" + |
| 551 | "(h) to view commands again\n(r/enter) to run suggested command\n(o) change objective" |
| 552 | ) |
| 553 | |
| 554 | def get_gpt_command(objective, url, previous_command, browser_content): |
| 555 | prompt = prompt_template |