[ad_1]
In this whitepaper, we’ll discuss how to use the ChatGPT 4 API in conjunction with the Google Meet, Google Drive, and Google Docs APIs to automatically generate meeting minutes.
Taking minutes during a meeting can be a tedious task and it is often difficult to capture everything that is discussed. Using artificial intelligence, the process can be streamlined so that you don’t miss anything.
Like Microsoft Teams or Zoom, Google Meet has the ability to record meetings. After the recording is activated, the meeting recording is generated in Google Document format and stored in the specified Google Drive shared folder. A Google Meet transcript file is used here, but a similar transcript can also be extracted from a Teams or Zoom recording.
For this, a simple web application will be used as a central point for handling user interactions and various API calls. The goal is to display a list of this meeting’s transcript documents stored in a predefined Google Drive folder. The user will be able to select one of these, then click a button to create a summary of the meeting minutes as well as the dates to set the action items. Also, these two new sections will be embedded in the same Google Document with the Google Docs API that contains the results of the ChatGPT API.
This article will walk you through the steps required to set up the necessary configuration and understand the Dash/Python application code used to manage the ChatGPT, Google Drive, and Docs APIs.
A link to my GitLab containing the full Python/Dash code is also available in the following sections.
At the end of this article, I will also share my thoughts on some of the limitations and improvements that could be made to this app. I hope this will give you new ideas on how to focus on more valuable tasks than taking meeting minutes.
Let’s dive in!
The web application looks like the screen below. The top section displays a list of transcript documents that are present in the user’s shared Google Drive folder. Such documents are automatically created “Check out the recordsfolder when the user clicks the Google Meet recording button.
The user can select a document from the list. The selected document is displayed in the central part. Finally, the user can click the button to create meeting minutes.
After pressing the button, the meeting minutes are automatically inserted into 2 new sections:
“meeting summary’ The section is a brief description of the meeting based on the meeting transcript. It will remain synthetic regardless of the duration of the encounter.
“Action points of the meetingA section is a checklist of numbered action items that is also based on the transcript. When known, the deadline is also included.
Each numbered item in a meeting action contains a checkbox supported by Google Docs. These can be used later by your teams to check off the list of actions and check them off after they are completed.
The following will allow you to modify and run my code on GitLab. Before you can do this, you need to register with OpenAI to get your API key. Also, Google Drive and Docs APIs must be enabled on the Google console, as well as creating a Google service account.
- Go to the OpenAI website and register to get your API key
- Go to my GitLab project called Meeting Minutes Generation with ChatGPT
- Replace the Jupyter Python notebook with Google Colab and save it in your own Colab folder
- replace ‘OPENAI_API_KEY‘ value in the code with your own api key
- Use the following link to enable the Google Drive and Google Doc APIs
- Use the following link to create a Google service account
- Download and save the Google Service Account Key (JSon File) in your Colab folder. name it”credentials_serviceaccount.json(or change the value in the code)
- share yourCheck out the recordsGoogle Drive folder with the Google Service account created earlier (witheditor“permission)
- Attend a Google Meet meeting. Write it down with a transcript. The video file and transcript document will be automatically generated in your ‘Check out the recordsGoogle Drive folder
- In the code, replace the ‘GOOGLE_MEET_RECORDING_FOLDER“The Meaning of Your ID”Check out the recordsPreviously shared Google Drive folder
- select ‘Let them all go“in”enforcement“Menu
- The WebApp should start in a few seconds. Click the URL generated at the bottom of the Colab notebook to display it
The app should look like the first screenshot in the previous section.
As of today, the ChatGPT 4 API is still in beta mode. The version used in the code is ‘gpt-4–0314‘ shot. It can also be switched to the current version, ‘gpt-3.5-turbo‘.
I will only focus on the most important parts of the code.
4.1. Google Drive integration / API
The first two lines of code are used to mount your Google Drive root folder. The main use is to find the generated Google service account certificate key (JSon file) in the Quick Start section.
The code in the following section will find a list of all the transcript document files stored in the Google Meet recording folder. The list will later be used to display these documents in the web application.
4.2. A text excerpt from the Google Meet transcript document
These functions are used to extract text elements from a specified Google Document ID. Google Meet creates a paragraph named ‘Registration‘. ‘s locationRegistrationThe section is identified and will later be used as a starting point for entering meeting minutes. Two sections inserted by the application will be placed before this.Registrationdepartment. (And afterAttendeessection)
4.3. ChatGPT Preparation: Splitting the transcript text into chunks
ChatGPT API models have a limited number of tokens per request. In order to remain compatible”gpt-3.5-turbomodel, the maximum value used in the code is 4096 tokens per request. But remember that “gpt-4The model can do much more. Also available in 8k or 32k models, these can be used to significantly improve the quality of meeting minutes for longer meetings.
As a result, the text of the Google Meet transcript document must be split into 4000 token chunks with 100 token overlaps.
These functions will prepare and return a list of particles that will later be used by the ChatGPT API.
4.4. Using the ChatGPT API
This function generates a meeting summary and action items in a few steps. A ChatGPT API call is made for each of these:
- Step 1: Summarize the text of the meeting record. The function iterates over the previously generated parts list. Content posted on ChatGPT is based on recorded conversations between attendees. The ChatGPT API is called for each part with the following request: ‘Summarize the meeting record:
‘ - Step 2: Combine the response (meeting summary) from Step 1. The ChatGPT API is called with the following request: ‘Combine meeting summaries:
‘ - Step 3: Get action items with dates from the transcript. The function iterates over the previously generated parts list. The ChatGPT API is called for each part with the following request: ‘From the text of the meeting transcript provided, the list of action items provided by date completed:
‘ - Step 4: Combine the meeting action items from step 3 into a short numbered list. The ChatGPT API is called with the following request: ‘Combine these meeting action items with a concise numbered list:
‘
Each ChatGPT API used a parameter (ietemperature‘) is documented in the code.
4.5. Using Google Docs API Management to include final meeting minutes
The purpose of this feature is to insert meeting minutes into a user-selected Google Doc. Text is inserted before ‘Registration‘ Paragraph. The starting index identified in the previous functions is used here as the starting point.
Here are two sections:Summary of the meeting“and”Action items of the meeting‘.
Each section is inserted in the following steps:
- The section title is inserted (as text, i.e.Summary of the meeting‘)
- Its style is set to ‘HEADING_1“, its text style is set to “bold“, its font size is set to”14‘
- The content of the section is inserted (this comes from the ChatGPT API result)
- Its style is set to ‘normal‘. The clause is also inserted with arrowsSummary of the meeting“section and checkbox”Action items of the meetingdepartment
Some ‘Compilation of tables“and”new lineCharacters are also inserted to correct the text returned from the ChatGPT API.
Tip: Please note that ‘noThe table is iterated in reverse to ensure the starting index position is always updated after each insertion of text.
4.6. Home Python Dash web application
This part is used to create a simple web application that the user can interact with. Basically, it displays a list of documents stored in a shared Google Drive folder. The user can choose one of them, which is displayed in the central part of the screen. After clicking the button, the minutes of the meeting are inserted into this document. Updated document updated with results.
This code is built on top of the Dash framework. It even works on a Google Colab notebook.
Each document is displayed in a dedicated iFrame. The document link is based on “embedLink‘ value previously retrieved by the Google Drive API.
Also, a progress bar is displayed during the stages of inserting ChatGPT API calls and Google Doc meeting minutes.
The main challenge of using ChatGPT inside your company is the leakage of sensitive information that your company is working on. This happened recently at Samsung, where employees accidentally leaked company secrets via ChatGPT.
One improvement to this code could be to perform data masking before calling the ChatGPT API. At a minimum, attendee names and additional tagged fields containing sensitive information should be masked. An appointment name can also contain multiple tags for data masking. someeting
For this, a lookup table should be used to store each field ID with its clear and masked value. So these fields can be masked before calling the ChatGPT API, and then unmasked when inserting meeting minutes sections with the Google Docs API.
Thanks for reading my article until the end, I hope you enjoyed it!
As you can see, ChatGPT 4 API together with Google Drive/Docs APIs is very powerful and can significantly contribute to improving your daily work.
You can find the entire source code on my GitLab: Generating Meeting Minutes with ChatGPT
[ad_2]
Source link