Safe mode
Execute GPT functions more reliably in your Google spreadsheets by enabling Safe mode, which:
- Avoids most timeouts, as it bypasses the 30-second runtime limit for custom functions in Google Sheets
- Prevents loss of data and unexpected costs when your spreadsheet auto-refreshes, which happens every few hours on Google Sheets
Safe mode only applies to:
- GPT-4 models
- GPT-4-turbo models
- Perplexity AI online models with GPT_WEB
Enable Safe mode
Prerequisites
In the GPT for Sheets sidebar, click Settings.
Enable Safe mode.
infoSafe mode doesn't apply to GPT-3.5-turbo models.
If you enable Safe mode for the first time, you are prompted to grant additional permissions. These permissions are required for GPT for Sheets to modify the formulas in your spreadsheets.
Click Sign-in with Google. A Sign in with Google window opens.
Select the Google account with which you have installed GPT for Sheets.
Click Allow to grant GPT for Sheets the required permissions.
Safe mode is now enabled and will be used for all executions with GPT-4, GPT-4-turbo models, and GPT_WEB.
Result storage and reuse
When you execute a formula using Safe mode without activating Auto-replace formulas, the original formula is modified to include its own result as the last parameter.
The result is thus stored in the spreadsheet itself, available for reuse each time the spreadsheet auto-refreshes. This gives you more control over formula refresh, which you can still perform manually by regenerating results.
Safe mode is a huge improvement over the cache feature, both in terms of execution count and storage/cache duration. It provides the most reliable method to reuse results in GPT for Sheets.
Cache | Safe mode | |
---|---|---|
# executions cached/stored | Approximately 900 | Unlimited* |
Cache/storage expiration | Approximately 6 hours | Unlimited |
Models supported | All models |
|
* Unlimited = Within Google Sheets limits
The following table describes when results are reused or refreshed with Safe mode enabled in different scenarios:
Modification | Examples | Consequence |
---|---|---|
None |
| Result is reused* |
Sidebar settings |
| Result is reused* |
Formula parameters |
| Formula refreshes** |
Formula input |
| Formula refreshes** |
* Reused = original result remains, nothing is sent to OpenAI, no extra cost
** Refreshed = execution sent to OpenAI, incurs cost and new result might be different from original result
Limitations
If you enable Safe mode in GPT for Sheets:
- Executions are a bit slower
- GPT for Sheets can only do up to 120 executions per minute (1,800 per hour)
- GPT for Sheets can't handle more than 2,000 executions launched in parallel
Auto-replace formulas for faster executions and to get raw data that you can manipulate immediately.