Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ERR_FR_MAX_BODY_LENGTH_EXCEEDED issue by setting default maxBodyLength #191

Closed
wants to merge 1 commit into from

Conversation

es-lynn
Copy link

@es-lynn es-lynn commented Jul 5, 2023

This PR addresses the issue #167, where a ERR_FR_MAX_BODY_LENGTH_EXCEEDED error is thrown when the createTranscription function is used with an audio file larger than 10 MB but smaller than 25 MB.

This is because the library uses axios which defaults to a 10 MB body limit.

The issue is resolved by setting a default maxBodyLength of 25 MB if it is not already set. This ensures that the limit aligns with OpenAI's maximum file size limit.

@es-lynn es-lynn force-pushed the master branch 3 times, most recently from f1c7f13 to 0c9304b Compare July 5, 2023 18:31
@es-lynn es-lynn marked this pull request as ready for review July 5, 2023 18:32
- increases the default file size limit to 25MB to accomodate the `createTranscript` API size limit
@rattrayalex
Copy link
Collaborator

Thank you so much for taking the time to fix this issue!

We have a completely rewritten upcoming v4 of this library, which shouldn't run into this issue with large file uploads as it replaces axios with fetch/node-fetch.

Please give it a try with the files you were having problems with before and let us know if you run into any problems!

@rattrayalex rattrayalex closed this Jul 9, 2023
@rattrayalex rattrayalex added the fixed in v4 Issues addressed by v4 label Jul 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed in v4 Issues addressed by v4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants