createTranscription() doesn't work as expected in NodeJS
Problem
Describe the bug Hi! I tried to follow the documentation when I was writing a transcription script using NodeJS. And I wanted to get a response in .srt format. But it returns an error. I tried to use the argument `response_format` as well as `responseFormat()`. But that didn't work. Also, there is only one way to communicate with OpenAI API: [code block] But anyway, it doesn't work if I would like to specify the output file format. To Reproduce 1. Run the function (one of them) 2. Get `Required parameter model was null or undefined` error Code snippets [code block] [code block] ``` OS macOS Node version Node v.16.13.0 Library version openai v.3.2.1
Error Output
error ### Code snippets
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: createTranscription() doesn't work as expected in NodeJS
Indeed, after reading Github README and API documentation you would expect that method createTranscription accepts an object but it accepts only raw parameters. https://platform.openai.com/docs/api-reference/audio/create?lang=node Especially the "Parameters" example is a bit misleading because it is formatted as object. The following code works: [code block] But object format would be easier t
Trust Score
3 verifications
- 1
Indeed, after reading Github README and API documentation you would expect that
Indeed, after reading Github README and API documentation you would expect that method createTranscription accepts an object but it accepts only raw parameters.
- 2
https://platform.openai.com/docs/api-reference/audio/create?lang=node
https://platform.openai.com/docs/api-reference/audio/create?lang=node
- 3
Especially the "Parameters" example is a bit misleading because it is formatted
Especially the "Parameters" example is a bit misleading because it is formatted as object.
- 4
The following code works:
[code block]
Validation
Resolved in openai/openai-node GitHub issue #93. Community reactions: 2 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep