GPT4 embedded in your browser, with the ability to use tools.
Current tools:
type RequestDOM = { cssSelector: string }; // Receive a summarized DOM for a selector.
type RequestText = { cssSelector: string }; // Request the visible text inside of a page region
type GetSelection = "GetSelection"; // Request the user's currently highlighted text
type Fill = { cssSelector: string, text: string } // To fill in form fields
type Calculate = { jsFormula: string } // To eval arbitrary JS in a sandbox, and return the result to the assistant.
type Respond = { textToDisplay: string } // To display a response to the user
Examples:
This example includes DOM viewing and form filling:
This example includes DOM viewing, text fetching, and doing a calculation in a sandbox:
More advanced calculation (sometimes it writes a recursive version if you don't encourage it not to):
This extension is based on Plasmo and was bootstrapped with plasmo init
.
First, run the development server:
pnpm dev
# or
npm run dev
Open your browser and load the appropriate development build. For example, if you are developing for the chrome browser, using manifest v3, use: build/chrome-mv3-dev
.
Run the following:
pnpm build
# or
npm run build
This should create a production bundle for your extension, ready to be zipped and published to the stores.
The easiest way to deploy your Plasmo extension is to use the built-in bpp GitHub action. Prior to using this action however, make sure to build your extension and upload the first version to the store to establish the basic credentials. Then, simply follow this setup instruction and you should be on your way for automated submission!