![]() ![]() Now, it’s up to you to tweak to your own needs. Obviously, that’s just a basic example prompt to get the ChatGPT API working properly with Sheets. I’m sure you’ll figure it out and have fun doing so.īut as a quick example, to show you that it really works, if you have a topic title in cell A1, you can place this formula below in any other cell and then let it do some magic! =AI_ChatGPT("Create an introduction paragraph for this topic: "&A1&".") Showing you exactly what you can do with prompts and spreadsheet layout is beyond the scope of this basic guide. Also, Google often change how they do things, so updating this guide would soon become a nightmare for me. I can't provide a tutorial on this because it's nuanced and requires a valid Google account etc. I allowed whatever they were looking for to get it working. ![]() NOTE: You may have to give Google certain permissions. Once you’ve put your API key into the quotation marks on the first line, click the Save icon and go back into Google Sheets. const SECRET_KEY = "YOUR API KEY" įunction AI_ChatGPT(prompt, temperature = 0.4, model = "gpt-3.5-turbo") ,Ĭonst res = JSON.parse(UrlFetchApp.fetch(url, options).getContentText()) Within the code editor of Apps Script, paste the following code and don’t forget to add your own unique API key where it says “YOUR API KEY” on the first line. When logged into your Open AI account, you create your API key here Step 2: Enter Apps Scriptsįrom Google Sheets, click on Extensions in the main menu and select Apps Script. Here’s how you can integrate the ChatGPT API with Google Sheets using the gpt-3.5-turbo model. ![]() What does GPT stand for? How to connect ChatGPT with Google Sheets using Google Apps Script ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |