cantino / browser-friend

GPT in your browser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Browser Friend

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: hn-post

This example includes DOM viewing, text fetching, and doing a calculation in a sandbox: hn-math

More advanced calculation (sometimes it writes a recursive version if you don't encourage it not to): fib

Development

This extension is based on Plasmo and was bootstrapped with plasmo init.

Getting Started

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.

Making production build

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.

Submit to the webstores

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!

About

GPT in your browser

License:MIT License


Languages

Language:TypeScript 98.6%Language:JavaScript 1.4%