This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// import the ChatGPTAPI | |
import { ChatGPTAPI } from 'chatgpt' | |
async function myFunction() { | |
// Initialize the constructor with your OpenAI API key | |
const api = new ChatGPTAPI({ | |
apiKey: YOUR_OPENAI_API_KEY | |
}) | |
// Invoke the sendMessage method to send a message to the GPT-3 model | |
const res = await api.sendMessage('Hello World!'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// DROP DOWN MENU | |
function onOpen() { | |
DocumentApp.getUi().createMenu("ChatGPT") | |
.addItem("Generate Image", "generateImage") | |
.addItem("Generate synonym ", "generateSynonym") | |
.addItem("Write a tagline", "tagLine") | |
.addToUi(); | |
} | |
// ****END MENU**** | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create sheet from stream(e.g. xml to xlsx) | |
var aspose = aspose || {}; | |
//get the aspose.cells module in to your project. | |
aspose.cells = require("aspose.cells"); | |
// load the fs module for reading/writing files | |
var fs = require("fs"); | |
// creates the read stream of the source file |