function Google Apps Script to call GPT and Gemini
- Creat sheet -> creat GAS file -> copy this code with model you want.
- Now, in your sheet file, use =askGPT(with model GPT) or =askGemini(with model Gemini) to chat with chat bot.
- example: =askGemini("Who is ntannn?")
- With chat GPT, u need have openai account and get API key here.
- With Gemini, u need have aistudio Google account and get API key here.
idk. I'm noob coder. I hope it can help u :((