Unlocking the power of Open AI: the way to automate information extraction

ChatGPT, developed by means of OpenAI, has won huge popularity for its innovative language mannequin. From streamlining company operations to simplifying research, Open AI has limitless probabilities. despite the fact, now not many are conscious that the technology at the back of ChatGPT is open-source, making it purchasable for any one to use and create their personal applications. One such utility is the Da Vinci mannequin, which will also be integrated into person-pleasant tools to make popular tasks more effective. The aim of this text is to discover the advantage of Open AI and to exhibit how it will also be mixed with Google Sheets to revolutionise the way one works and lives.

what's Open AI?

synthetic Intelligence (AI) is a container of desktop science that makes a speciality of growing machines and laptop classes that may operate tasks that typically require human intelligence, reminiscent of knowing natural language, recognising photos, or making choices. These machines are designed to learn from facts, which permit them to enrich their performance over time.

a number of use-circumstances of OpenAI

The OpenAI API is a tool that permits individuals to use a powerful language mannequin known as GPT-three through an easy and easy-to-use interface. With the support of AI, computers can now operate tasks that had been as soon as notion to be exclusive to people, equivalent to recognising speech, translating languages, and even riding automobiles. AI is being built-in into a considerable number of industries, making our lives greater convenient, effective and smarter. you will start the use of it without having to know the know-how behind it. It additionally helps distinct languages like English, Spanish, French, and German. through the use of OpenAI, businesses and individuals can save a lot of time and effort by means of automating tedious and time-consuming tasks.

here we are able to discover how OpenAI will also be built-in into Google Sheets, a device that many of us use on an everyday basis, via a step-by-step method. this article will reveal us the way to generate our personal API Key, set up a Google Sheet, and integrate OpenAI into it in order that you may beginning reaping the advantages of this modern expertise.

the way to integrate Google sheets with Open AI

we're continually bombarded with counsel. From emails to social media posts, it may also be overwhelming to keep up with all of it. hence, there has to be a greater effective and effective option to sift through enormous amounts of advice. by using Google App script and OpenAI, one could effectively summarise any article or textual content, saving time and effort.

Step 1: Navigate to Open AI and generate your API Key via this hyperlink.

Step 2: installation a Google Sheet with the content material that has to be summarised.

Step 3: Create a brand new App Script venture by means of going to "Extensions" after which "Apps Script".

Step four: Add the code provided beneath into the Script Editor.

The code reads textual content from a sheet named 'Sheet1', and passes it to OpenAI to generate bullet features. This system can shop lots of time and energy for companies and people who deserve to summarise huge amounts of text. The code can also be copied via scanning the QR code given beneath.

feature summarizeText()

const spreadSheet = SpreadsheetApp.getActiveSpreadsheet()

const sheetName = spreadSheet.getSheetByName('Sheet1');

const numberOfContents = sheetName.getLastRow();

const completionsLink = "https://api.openai.com/v1/completions";

let paramsToSummarise =

mannequin: "textual content-davinci-003",

prompt: "",

temperature: 0,

max_tokens: 204,

top_p: 1.0,

frequency_penalty: 0.0,

presence_penalty: 0.0,

let alternate options =

components : 'get',

contentType: 'application/json',

muteHttpExceptions: genuine,

payload: ,

headers: Authorization: "Bearer <open ai api token>",

for (let content = 2; content <= numberOfContents ; content material++ )

let promptContent = sheetName.getRange(content,1).getValue();

paramsToSummarise.prompt = promptContent + "\n\nBullet features"

alternatives.payload = JSON.stringify(paramsToSummarise)

let text = UrlFetchApp.fetch(completionsLink, alternate options).getContentText()

let obj = JSON.parse(textual content)

sheetName.getRange(content material,2).setValue(obj.selections[0].textual content);

Step 5: substitute <open ai api token> with the respective API token generated in Step 1.]

Step 6: Run the code via clicking the "play" button or by pressing "Ctrl+Enter".

Step 7: The code will now extract the text in Column 1 to Open AI API, and generate the summary as bullet features

Step 8: The bullet aspects will now be up to date to Column 2 of Sheet 1

This code is simply the beginning of what will also be executed the usage of OpenAI. OpenAI's capabilities go far past just generating bullet aspects. the use of the same code you will summarise an article from a given hyperlink, translate a textual content into one other language, summarise person feedback, generate responses to consumer queries and so plenty extra.


The possibilities of OpenAI are countless, and the expertise is always evolving. OpenAI is additionally designed to be consumer-friendly, and the code above is an example of this. by using Google Sheets which is basic to deploy, even non-technical clients can rapidly see the merits of OpenAI for themselves.

despite the fact, it is vital to be aware that when the use of OpenAI or any AI expertise, one need to bear in mind of the information we feed into it. One must make sure that delicate assistance is not covered in the facts, because it may also be used to train the mannequin and therefore, result in competencies protection and privacy issues. you will thoroughly release the energy of OpenAI and reap the benefits it has to offer while keeping the security and privacy of our personal suggestions.

Premnisha Balakumar is lead developer and the head of Communities for Thoughtworks Coimbatore


No comments

Post a Comment

© all rights reserved
made with by templateszoo