Skip to main content

Command Palette

Search for a command to run...

How to control a browser with GPT-3

Published
1 min readView as Markdown
H

I build systems that blend AI and automation to solve real-world problems

In this tutorial, we will see how to control a browser with GPT-3 using just text prompts.

This article is inspired by this tweet thread and the credit for the code and method used in this tutorial goes to the author of the tweet thread.

Table of Contents

Control a browser with GPT-3

Requirements

  • An OpenAI GPT-3 account
  • A Computer equipped with Python 3.x and a command line program

Setup & Usage

  1. Get the code from this repo.
  2. Get your OpenAI API key from your OpenAI account
  3. Open your command line program
  4. In the command line program, set an environment variable OPENAI_API_KEY with your OpenAI API key as its value.
  5. In the command line program, change the directory to the code repo from step 1 above.
  6. Run the code file by using this command python natbot.py
  7. Follow the instructions on the terminal

More from this blog

Harish Garg | AI Automation & Agentic CLI Consulting

119 posts

Agentic CLI consulting for startups and teams. Claude Code, Gemini CLI, and Rovo Dev in practice. Playbooks, checklists, and real workflows. Contact: [email protected]