Skip to main content

Safe mode

Enable Safe mode to avoid timeouts of GPT functions with gpt-4, gpt-4-turbo, OpenAI Assistants, and Perplexity AI's model through the GPT_WEB function. This is recommended only if you’re planning on using these particularly slow models or assistants, and if you’re expecting long generations (over 500 words) which will be slower and could time out.

By default, Safe mode automatically replaces formulas with their results for immediate access and faster execution, but you can change this behavior if you prefer to keep the original formulas and store the results within them.

Enable Safe mode

You have opened a Google spreadsheet and selected Extensions > GPT for Sheets and Docs > Open.
  1. In the GPT for Sheets sidebar, click Settings.

  2. Enable Safe mode. Auto-replace formulas is automatically enabled. Disable it if you don't want to replace the formulas with their results. Learn more.

  3. 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.

    1. Click Sign-in with Google. A Sign in with Google window opens.

    2. Select the Google account with which you have installed GPT for Sheets.

    3. 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, OpenAI Assistants, and GPT_WEB.

With Auto-replace formulas

When you enable Safe mode, Auto-replace formulas is automatically activated. This feature replaces the original formula with its result after execution when you drag a formula to apply it to multiple cells. The last cell of the range isn't replaced, so you can later reuse the formula to drag it again. This allows you to work directly with the results generated by GPT functions immediately after they run, and also ensures quicker execution times.

Keep Auto-replace formulas enabled if:

  • You're confident the result will be good and you want to get the raw result directly in the cell.
  • You want to launch between 500 and 10,000 executions at once (execution speed is higher when Auto-replace formulas is enabled).

Without Auto-replace formulas

When you use Safe mode without Auto-replace formulas, original formulas are modified to include their own result as the last parameter.

Use Safe mode without Auto-replace formulas if:

  • You want to keep the original formulas and store the results within them.
  • You're planning to run fewer than 500 executions at once (execution speed is lower when Auto-replace formulas is disabled).

The results are stored in the formulas themselves, and reused each time the spreadsheet auto-refreshes. You can also copy a formula along with its result to another cell or spreadsheet, whether or not Safe mode is enabled on the new spreadsheet. No extra costs are incurred when reusing the result. You can remove the last parameter from a formula and reload it to generate a new result.

Safe mode execution time

Formulas executed in Safe mode take longer to complete.

To provide better visibility, GPT for Sheets displays an estimated time of arrival (ETA) for formulas executed in Safe mode, which is shown in each cell during the execution. In most cases, the ETA will be correct, but if an issue arises, the execution can take longer than initially estimated.