This is a Chrome browser extension designed to enhance the user experience on the OpenAI GPT-4 Web interface. It helps users keep track of the number of messages sent to the GPT-4 model, the number of tokens used, and the start time of the 3-hour usage cap.
The extension works by using a Tampermonkey script to override the fetch function, capturing the fetch request and response. The collected information is stored in the localStorage and is then accessed and processed by the Chrome extension.
- Message Counter: Keeps track of the number of messages sent to GPT-4 during a session.
- Token Counter: Monitors the number of tokens used in a session.
- Cap Timer: Records the start time of the 3-hour cap for GPT-4 usage.
- Google Chrome Browser
- Tampermonkey Extension installed on Chrome
- Download or clone this repository.
- Install the Tampermonkey extension on your Chrome browser if you haven't already.
- Open Tampermonkey dashboard and create a new script.
- Copy and paste the content of
backend.js
into the new script and save it. - Open the Extension Management page by navigating to
chrome://extensions
. The Extension Management page can also be opened by clicking on the menu icon, hovering over More Tools then selecting Extensions. - Enable Developer Mode by clicking the toggle switch next to Developer mode.
- Click the LOAD UNPACKED button and select the downloaded or cloned directory.
Once the extension is installed, navigate to the OpenAI GPT-4 Web interface. The Tampermonkey script will automatically start tracking the fetch requests and responses, storing the data in localStorage. The Chrome extension will then access this data and display the number of messages, tokens, and the start time of the 3-hour cap.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.