Saturday, May 25, 2024
HomeArtificial IntelligenceAssembly minutes technology with ChatGPT 4 API, Google Meet, Google Drive &...

Assembly minutes technology with ChatGPT 4 API, Google Meet, Google Drive & Docs APIs | by Supply SADEY


Supply:generated by OpenAI DALL-E “Oil fashion portray of 5 individuals linked on Meet. Robots writing assembly minutes”​

On this technical article, we’ll discover methods to leverage the ChatGPT 4 API together with Google Meet, Google Drive, and Google Docs APIs to mechanically generate assembly minutes.

Taking minutes throughout a gathering generally is a time-consuming activity, and it’s typically tough to seize all the things that’s mentioned. With using synthetic intelligence, the method will be streamlined to make sure that nothing is missed.

As Microsoft Groups or Zoom, Google Meet has the power to file conferences. As soon as the recording is activated, the transcript of the assembly is generated in a Google Doc format and is saved on an outlined Google Drive shared folder. Google Meet transcript file is used right here however related transcript textual content extract may be finished with Groups or Zoom recording.

For this, a easy net software will likely be used as a central level to handle the person interplay in addition to the completely different API calls. The aim is to show a listing of those assembly transcript paperwork saved on a predefined Google Drive folder. The person will be capable of choose certainly one of them then press a button to generate a abstract of the assembly minutes in addition to the motion gadgets with due dates. Additionally, these two new sections will likely be inserted in the identical Google Doc with Google Docs API, containing the outcomes from ChatGPT API.

This text will stroll you thru the steps required to arrange the required configuration and to know the Sprint/Python software code used to handle the ChatGPT, Google Drive & Docs APIs.

A hyperlink to my GitLab containing the complete Python/Sprint supply code can be obtainable on the subsequent sections.

By the top of this text, I’ll additionally share my ideas on some limitations and enhancements that might be finished on this software. I hope it would help you discover new concepts on methods to keep centered on extra invaluable duties than taking assembly minutes.

So let’s dive in!

Get Licensed in ChatGPT + Conversational UX + Dialogflow

The net software appears to be like just like the display beneath. The higher part shows a listing of transcript paperwork current on the person’s shared Google Drive folder. Such paperwork are mechanically generated within the ‘Meet Recordings’ folder when the person triggers the Google Meet recording button.

The person can choose a doc within the checklist. The chosen doc is displayed within the central half. Lastly, the person can press the button to generate the assembly minutes.

The primary display of the net software (Supply: Autor)

As soon as the button pressed, the Assembly minutes are mechanically inserted in 2 new sections:

The ‘Assembly Abstract’ part is a brief description of the assembly based mostly on the assembly transcript. It can keep artificial regardless of the period of the assembly.

The ‘Assembly Motion Gadgets’ part is a numbered motion gadgets checkbox checklist which can be based mostly on the transcript. When recognized, a due date can be inserted.

The end result: The Assembly Minutes are generated within the chosen doc (Supply: Autor)

Every numbered assembly motion merchandise accommodates a checkbox that’s natively supported by Google Docs. They might be used in a while by your groups to observe up the motion checklist and to examine them as soon as they’re finished.

The next will help you edit and run the code current on my GitLab. Earlier than doing that, you’ll must register at OpenAI to get your API key. Additionally, Google Drive and Docs APIs must be activated on the Google console, in addition to making a Google Service Account.

  • Go to the OpenAI web site and signal as much as get your API Key
  • Go to my GitLab venture named Assembly Minutes technology with ChatGPT
  • Edit the Jupyter Python pocket book with Google Colab and reserve it by yourself Colab folder
  • Exchange the ‘OPENAI_API_KEY’ worth within the code with your personal api key
  • Use the next hyperlink to activate the Google Drive & the Google Doc APIs
  • Use the next hyperlink to create a Google Service Account
  • Obtain and save the Google Service Account Key (JSon File) in your Colab folder. Identify it ‘credentials_serviceaccount.json’ (or change the worth within the code)
  • Share your ‘Meet Recordings’ Google Drive folder with the Google Service Account created beforehand (with ‘Editor’ permission)
  • Attend a Google Meet assembly. Report it with the transcript. The video file and the transcript doc will mechanically be generated in your ‘Meet Recordings’ Google Drive folder
  • Within the code, exchange the ‘GOOGLE_MEET_RECORDING_FOLDER’ worth with the ID of your ‘Meet Recordings’ Google Drive folder shared beforehand
  • Choose ‘Run All’ within the ‘Execution’ menu
  • A WebApp ought to begin in just a few seconds. Click on on the URL generated within the backside of the Colab pocket book to show it

The appliance ought to appear like the primary screenshot within the earlier part.

As of in the present day, the ChatGPT 4 API remains to be in beta. The used model within the code is ‘gpt-4–0314’ snapshot. It will also be switched to the present model, ‘gpt-3.5-turbo’.

I’ll focus solely on an important items of the code.

4.1. Google Drive integration / API

Supply: Autor

The primary two strains of code are used to mount your Google Drive root folder. The primary utilization is to retrieve the Google Service Account credential key (JSon file) generated inside the Fast Begin part.

The code of the subsequent part retrieves a file checklist of all transcript paperwork saved within the Google Meet Recording folder. The checklist will likely be used later to show these paperwork on the net software.

4.2. Google Meet transcript doc textual content extract

Supply: Autor

These features are used to extract textual content components from an outlined Google Doc ID. Google Meet generates a paragraph named ‘Transcript’. The situation of the ‘Transcript’ part is recognized and will likely be used later as a place to begin to insert the assembly minutes. The 2 sections inserted by the appliance will likely be positioned simply earlier than this ‘Transcript’ part. (and proper after the ‘Attendees’ part)

4.3. ChatGPT preparation: break down of the transcript textual content into chunks

ChatGPT API fashions have a restricted variety of tokens per request. So as to keep suitable with the ‘gpt-3.5-turbo’ mannequin, the max worth used within the code is 4096 tokens per request. However remember the fact that the ‘gpt-4’ mannequin can deal with way more. A 8k or a 32k fashions are additionally obtainable, they can be utilized to considerably enhance the assembly minutes’ high quality for lengthy conferences.

As a consequence, the Google Meet Transcript doc textual content must be damaged down into chunks of 4000 tokens with an overlap of 100 tokens.

These features will put together and return a listing of chunks that will likely be used later by the ChatGPT API.

4.4. ChatGPT API utilization

Supply: Autor

This operate generates the assembly abstract and motion gadgets in just a few steps. A ChatGPT API name is finished for every of them:

  • Step 1: Summarize the assembly transcript textual content. The operate iterates over the chunk checklist generated beforehand. The content material despatched to ChatGPT is predicated on the recorded dialog between the attendees. The ChatGPT API is named for every chunk with the next request: ‘Summarize this assembly transcript: <chunk>
  • Step 2: Consolidate the response (Assembly abstract) from Step 1. The ChatGPT API is named with the next request: ‘Consolidate these assembly summaries: <ChatGPT responses from Step 1>
  • Step 3: Get motion gadgets with due dates from the transcript. The operate iterates over the chunk checklist generated beforehand. The ChatGPT API is named for every chunk with the next request: ‘Present a listing of motion gadgets with a due date from the supplied assembly transcript textual content: <chunk>
  • Step 4: Consolidate the assembly motion gadgets from Step 3 in a concise numbered checklist. The ChatGPT API is named with the next request: ‘Consolidate these assembly motion gadgets with a concise numbered checklist: <ChatGPT responses from Step 3>

Every ChatGPT API used parameter (i.e. ‘temperature’) is documented within the code.

4.5. Google Docs API administration utilization to insert the ultimate assembly minutes

Supply: Autor

The target of this operate is to insert the assembly minutes into the Google Doc chosen by the person. The textual content is inserted earlier than the ‘Transcript’ paragraph. The beginning index recognized within the earlier features is used right here as a place to begin.

Two sections are inserted right here: ‘Assembly Abstract’ and ‘Assembly Motion gadgets’.

Every part’s insertion is finished with the next steps:

  • the part’s title is inserted (as a textual content i.e. ‘Assembly Abstract’)
  • its fashion is about to ‘HEADING_1’, its textual content fashion is about to ‘daring’, its font dimension is about to ‘14
  • the part’s content material is inserted (this comes from the ChatGPT API end result)
  • its fashion is about to ‘NORMAL’. A bullet level can be inserted with an arrow for the ‘Assembly Abstract’ part and a checkbox for the ‘Assembly Motion gadgets’ part

Some ‘tabulation’ and ‘new line’ characters are additionally inserted to right the textual content returned from the ChatGPT API.

Tip: Please be aware that the ‘ar’ desk is iterated in a reversed manner to make sure the beginning index place stays at all times updated following every textual content insertion.

4.6. The primary Python Sprint Internet Software

Supply: Autor

This half is used to construct a easy net software on which the person can work together. Principally, it shows a listing of paperwork saved on a Google Drive shared folder. The person can choose certainly one of them which is displayed within the central a part of the display. As soon as the button is pressed, the assembly minutes are inserted into this doc. The up to date doc is refreshed with the outcomes.

This code is constructed on prime of the Sprint framework. It even works inside a Google Colab pocket book.

Every doc is displayed inside a devoted iFrame. The doc’s hyperlink is predicated on ‘embedLink’ worth, beforehand retrieved by the Google Drive API.

Additionally, a progress bar is displayed through the ChatGPT API calls and the Google Doc assembly minutes’ insertion steps.

The primary problem utilizing ChatGPT inside your organization is to have a leak of delicate info your organization is engaged on. This occurred just lately at Samsung the place workers have by accident leaked firm secrets and techniques with ChatGPT.

One of many enhancements of this code might be the execution of knowledge masking earlier than calling the ChatGPT API. No less than the attendee names and extra tagged fields containing delicate info must be masked. The assembly title may additionally include some tags for knowledge masking. I.e ‘Assembly with <Microsoft>’ the place ‘Microsoft’ will likely be masked on the whole transcript doc knowledge extract. As soon as the response is obtained from ChatGPT API, the reverse must be finished. Every masked info must be unmasked earlier than calling the Google Docs API.

For this, a reference desk must be used to retailer every discipline ID with its clear and its masked worth. So these fields might be masked earlier than calling the ChatGPT API, then unmasked when inserting the assembly minutes’ sections with Google Docs API.

Thanks for studying my article to the top, hope you loved it!

As you’ll be able to see, ChatGPT 4 API mixed with Google Drive/Docs APIs are very highly effective and might contribute considerably to enhancing your day-to-day work.

You’ll find the whole supply code on my GitLab: Assembly Minutes technology with ChatGPT

Get Licensed in ChatGPT + Conversational UX + Dialogflow
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments