-
Notifications
You must be signed in to change notification settings - Fork 3.8k
fix:fix response format bug #282
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
Conversation
@MattFisher please review it, i don't know how i close last same PR 😭 |
I'm not a maintainer of the project or anything, just another user! Though as I said here, I think this will fix the issue without further code changes. The Content-Type header on the response is always set correctly (at least for the audio transcription responses), so we can deduce whether to json-decode within For the json and verbose_json response formats, the Content-Type is 'application/json', while for text, srt, and vtt, the Content-Type is 'text/plain; charset=utf-8'. |
ok thanks |
I've manually tested the change and it works for all the different audio response formats. I can't verify that it doesn't break any other endpoints though. |
@MattFisher I thought about it for a second,i still think we should define a enum and add a function parameter to make code more clearly |
@guaguaguaxia that would make sense if the Audio module was the only code that consumed the |
you r right, i am not familiar with this project structure |
Might want to roll back the whitespace changes in |
@MattFisher thanks. @logankilpatrick @mpokrass you can see this:#243 (comment) |
Looks awesome! Thanks for writing the PR! |
Now, response_format is in plain text and not defaults to json format as it says in docs, right? |
No,if response_format type is json or verbose_json,it still return json,other return text |
* fix:fix bug * fix:fix response_format bug * fix:fix response_format bug * fix:fix response_format bug * fix:fix response_format bug * fix:fix response_format bug * fix:fix response_format bug * fix:fix response_format bug
* fix:fix bug * fix:fix response_format bug * fix:fix response_format bug * fix:fix response_format bug * fix:fix response_format bug * fix:fix response_format bug * fix:fix response_format bug * fix:fix response_format bug
No description provided.