How I use AI to take perfect notes...without typing (Help needed)

Got this to work on a longer recording (1h). Testing with a few more to confirm. Thank you!!

Can you explain the main changes to what the code does vs the original? Should this overcome all time limits - eg, would it be expected to work for a 5hr recording?

Andrew, I think I got this to work. Thank you for your help! I am going to test a few more files just to be sure and report back. I have two questions:

  1. I have ChatGPT pro but I dont think it is in the work flow. How do I change it from ChatGPT3.5 to ChatGpt 4?

  2. Do I change my settings from 500 seconds back to 300 and what should I keep my memory at? This is specifically for the settings in the workflow of pipedream.

Again, I can’t thank you enough!!

@gabriel.dane.509 awesome, thank for you for the feedback! There were two main changes in the code:

  1. After chunking the text into smaller ones, it sends these chunks in parallel to OpenAI
  2. It uses Bottleneck to send at max 5 requests simultaneously

I’ll see with the Pipedream team if they can update the code in the workflow link in Thomas’ page.

Re: 5h+ or longer recordings, I’m not sure. The workflow may timeout but it’s worth testing

1 Like

@nelsonspam7 that’s great to hear! Regarding your questions:

  1. For this workflow, I think gpt-3.5-turbo works well and is a lot cheaper and faster. Is there a reason you want to change it to gpt-4? To see if you have access through the API, create a new OpenAI Chat step and select your account, and see if gpt-4 model option shows up to you like in this screenshot:

    If it doesn’t and you have another account, you’ll have to Connect a New Account for OpenAI.
  2. You can try changing it to 300 seconds if 500 seconds incurs into more credits being used. In terms of memory, I think the minimum (256MB) is enough. I’ve never had a problem with memory with OpenAI workflows.

Well, I figured if I have gpt 4 I may as well use it. I also figured it would give me better responses? Or is that not the case? I will try and see if I have access now.

This is all I see

@nelsonspam7 yeah gpt-4 is way better in some cases, but in this case for transcripts and analyzing text it’s not tradeoff that’s worth it, since it is a lot more expensive.

In your screenshot, can you check the Model prop below the account?

Though if you have really long audios gpt-4 can be better, since you can pass more tokens (text) to it in one request, resulting in less requests overall. That might be something worth investigating.
In the code step, on line 120: const maxTokens = 2000, if you have gpt-4 you can try changing it to 6000.

Model prop? Sorry I don’t know what that means. Is this it? And yeah, if it makes no difference then I will just leave it alone. But I am willing to test it too.



You can follow this screen recording:

Pipedream Workflows are composed of component steps, which can be sources (triggers) or actions. Components have props, which are configurable values that are passed to the component execution. In this case, the Model prop sends a request to OpenAI with your account’s API_KEY to check which gpt versions you have available for use, then lists these options for you to select.

There are many other apps available in Pipedream, so you can create complex workflows that can be automatically triggered and run. Here’s a link that will help you understand what you can do with Pipedream.

When I go to edit my workflow, it does not show me those options. Does that mean I need to rebuild the entire workflow?

Yes, you can create new workflow just for this test. Afterwards you can delete it

Ok, I will try that later today when I get some time. Thank you again.

You’re welcome. Please share any updates you have

Thank you so much! Will let you know if I test some longer multi-hour audio.

I rebuilt the entire workflow and this option still did not populate for me. Only 3.5. I tried changing the token to 6000 as well from 2000 as you mentioned but did not work, probably because it is on 3.5 still. 3.5 works well so it is not a HUGE deal but just wanted to see the difference with GPT 4.

I have another request if you’re up for it, Andrew. I would love to change the structure of the output to Notion to put the Transcript as the last item. So, Summary, Additional Info, Transcript. I tried some things, but I’m too novice to figure it out on my own. I think this would really optimize the output of the notes for when you go back to read them. Put the highest value content at the top of the Note. The transcript is great to have, but lets be honest, how often is the word-for-word conversation something you fully re-read. Especially with these great structured key points, etc. Thanks again for the amazing help already!

@gabriel.dane.509 here’s the modified code for the Notion update_page step (I asked ChatGPT heh):

import { Client } from "@notionhq/client"
export default defineComponent({
  props: {
    notion: {
      type: "app",
      app: "notion",
    }
  },
  async run({ steps, $ }) {
    const notion = new Client({ auth: this.notion.$auth.oauth_access_token });

    // Set the page ID
    const pageID = steps.notion.$return_value.response.id.replace(/-/g, '')

    /* --- Send the Additional Info to the Notion Page --- */

    // Split the additional info array into blocks of 95 blocks max
    const additionalInfo = steps.notion.$return_value.additional_info
    const infoHolder = []
    const infoBlockMaxLength = 95

    for (let i = 0; i < additionalInfo.length; i += infoBlockMaxLength) {
      const chunk = additionalInfo.slice(i, i + infoBlockMaxLength)
      infoHolder.push(chunk)
    }

    // Now send all the additional info to Notion
    async function sendAdditionalInfotoNotion(info) {

      const data = {
        block_id: pageID,
        children: []
      }

      for (let block of info) {
        data.children.push(block)
      }

      const response = await notion.blocks.children.append(data)
      return response

    }

    const additionalInfoAdditionResponses = []
    for (let addition of infoHolder) {
      const response = await sendAdditionalInfotoNotion(addition)
      additionalInfoAdditionResponses.push(response)
    }

    /* --- Send remaining Transcript blocks to the Notion Page --- */

    // Push the additional transcript groups to the Notion page
    async function sendTranscripttoNotion(transcript) {

      const data = {
        block_id: pageID,
        children: []
      }

      for (let sentence of transcript) {
        const paragraphBlock = {
          "paragraph": {
            "rich_text": [
              {
                "text": {
                  "content": sentence
                }
              }
            ]
          }
        };

        data.children.push(paragraphBlock)
      }

      const response = await notion.blocks.children.append(data)
      return response
    }

    const transcriptArray = steps.notion.$return_value.transcript
    transcriptArray.shift()
    const transcriptAdditionResponses = []
    for (let transcript of transcriptArray) {
      const response = await sendTranscripttoNotion(transcript)
      transcriptAdditionResponses.push(response)
    }

    const allAPIResponses = {
      transcript_responses: transcriptAdditionResponses,
      additional_info_responses: additionalInfoAdditionResponses
    }

    return allAPIResponses
  },
})

Hello,

This is a real good idea @gabriel.dane.509! @andrewcturing I just tried the updated code and it is still putting the transcript first. It actually put the transcript first and then what appears to be the rest of the transcript last.

1 Like

That’s part of how I got stuck, too! I think it’s because something is happening in both of the Notion steps with Pipedream to do something with the transcript.