Guides

GPT formula

Lido's GPT formula allows you to use OpenAI API from a spreadsheet

Lido's GPT formula allows you to use OpenAI API from a spreadsheet

=GPT(<your OpenAI credential>, prompt, output_cell, [model], [max_tokens], [response_format], [temperature])

Obtaining an OpenAI API key

  • Create an OpenAI account if you don't have one at openai.com; when prompted, choose API as the desired usecase.
  • On the API Key Page, press "Create new secret key".

Adding OpenAI API key to Lido

  • Type =GPT( in any cell in Lido. A drop down list will appear with your existing OpenAI credentials and the option to add a new OpenAI credential.

  • Press "Add Credential" to add a new credential

Example: using the GPT formula to compose emails

  • Here is an example of GPT formula being used to compose a personalized email to remind their customers to renew their subscription

  • To run the GPT action, right click on the cell containing the action and press "Run Action"

  • The result of the GPT call will be placed in the cell specified by the output_cell argument in the GPT formula. In the above example, output cell is H2

Optional Arguments

  1. model - See OpenAi's list of available modes here https://platform.openai.com/docs/models. The default value is "gpt-3.5-turbe".
  2. max_tokens - maximum number of response tokens. The default value is 2048.
  3. response_format - possible values are "text" and "json_object". The default value is "text".
  4. temperature - Specifies how much randomness is fed into the algorithm. Consult OpenAi documentation for more details. Default value is 0.