This repository was archived by the owner on Sep 9, 2024. It is now read-only.

Description
Hello there,
I would like to use my openAI account instead of this one:
function getGPTResponse(question) {
var options = {
'method' : 'post',
'contentType': 'application/json',
// Convert the JavaScript object to a JSON string.
'payload' : JSON.stringify({
'message': question
})
};
const response = UrlFetchApp.fetch('https://chatgpt-api.kesarx.repl.co/chat', options);
const json = JSON.parse(response.getContentText());
return json.choices[0].message.content;
}
Does anyone know how to change it for the openAI chat API? (https://platform.openai.com/docs/api-reference/chat)
Thanks!