opemai api key
opemai api key
if (!userInput) {
Logger.log("No input found in the last row.");
return;
}
var options = {
"method": "post",
"headers": {
"Authorization": "Bearer " + apiKey,
"Content-Type": "application/json"
},
"payload": JSON.stringify({
"model": "gpt-4",
"messages": [{"role": "user", "content": userInput}]
})
};