Use OpenAI with Google Spreadsheets
Nimesh Ekanayake
Technical Consultant @ Platned | MSc | Lecturer | IFS Certified x2 | Boomi Certified
This article explains how you can integrate OpenAI GPT-3 with Google Spreadsheets. This allows you to complete spreadsheet tasks with the use of AI.
Pre-requisites
Guidelines to complete integration
OpenAI API Key Generation
API function used to connect to OpenAI
Tip: Make sure to subscribe to above Gist since all future revisions with improvements will be made to this file. Then you can refer to this file later and update your functions.
Creating a Spreadsheet and connect the API function
Example code after modification:
const SECRET_KEY = "sk-c0rXVe6m5UaT7Bd7hwcZT0BlbkFJMnBRSwgOat40SVstiJA1";
领英推荐
Note: When there are revisions to functions in the Gist file we discussed above, this is the same place you need to update the new revised code as well.
Use the OpenAI for Spreadsheet taks
Now that you have connected the OpenAI and Spreadsheet, you can start using below functions. (New functions will be updated in the Gist in future)
OPEN_AI(prompt, precision, model, max_tokens)
OPEN_AI_CATEGORIZE(category_list, category_value_list, input, rules = [])
Video tutorial
Follow Nimesh Ekanayake ?on LinkedIn