TomFrankly / pipedream-notion-voice-notes

Take notes with your voice and send them to Notion
94 stars 49 forks source link

Error An error occured while attempting to split the file into chunks, or while sending the chunks to OpenAI #46

Closed Darikwa closed 7 months ago

Darikwa commented 7 months ago

I have tried the suggested fix below and have put billing info on my Open AI account and have gone as far as putting credit on the account for $100, plus generating new API's. I have premium account on Chat GPT and tried changing from 3.5 to 4. The files in question are 22.6MB and 19.3MB respectively, about an hour worth of recording. Annoyingly, I have manage to execute two larger files of 60MB each.

"If the full error below says "Unidentified connection error", please double-check that you have entered valid billing info in your OpenAI account. Afterward, generate a new API key and enter it in the OpenAI app here in Pipedream. Then, try running the workflow again."

TomFrankly commented 7 months ago

@Darikwa can you try rerunning the workflow?

If you've gone through those steps, it's likely to do intermittent downtime on OpenAI's end. Sam Altman has been saying that their servers have been hit incredibly hard since Dev Day last week, to the point where he had to close ChatGPT Plus signups. The API is likely affected as well.

mayorgergich commented 7 months ago

Just to share I'm currently experiencing this issue.

TomFrankly commented 7 months ago

@mayorgergich can you past your Logs tab contents?

I'm fairly certain this is due to API instability on OpenAI's end, but if you can paste the logs I can check for other issues.

TomFrankly commented 7 months ago

Hey @Darikwa – I think is a generic APIConnectionError from OpenAI, which means it doesn't get a status code but generally means the script was unable to connect to the OpenAI API. This is likely due to factors beyond our control – e.g. issues at OpenAI, or with AWS Lambda (what Pipedream workflows run on).

However, I've gone in and improved the code so that it'll now retry a few times if it hits this generic error. Previously, it would look for a status code before retrying, as I didn't know OpenAI's API had an error type that lacked a status code.

You can update your workflow like so: https://thomasjfrank.com/how-to-transcribe-audio-to-text-with-chatgpt-and-notion/#update

Hopefully this at least reduces the rate of errors like this, since the script will now retry automatically if it hits one!