You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are 2 issues with gateway's audio and octet-stream resonse forwarding.
For audio response, it has a hardcoded audio/mpeg content-type check. But OpenAI sends some other audio content types also. Example: audio/aac, audio/flac, etc. Due to the hardcoded check, the other types goes to JSON response handler instead of audio response handler
In handleOctetStreamResponse function, JSON.stringifiy(response.body) is not required to forward the response as it is. JSON.stringify needs to be removed
There are 2 issues with gateway's audio and octet-stream resonse forwarding.
For audio response, it has a hardcoded
audio/mpeg
content-type check. But OpenAI sends some other audio content types also. Example: audio/aac, audio/flac, etc. Due to the hardcoded check, the other types goes to JSON response handler instead of audio response handlergateway/src/handlers/handlerUtils.ts
Lines 522 to 524 in 33b1122
In
handleAudioResponse
function, JSON.stringifiy(response.body) is not required to forward the response as it is. JSON.stringify needs to be removedgateway/src/handlers/streamHandler.ts
Lines 73 to 75 in 33b1122
In
handleOctetStreamResponse
function, JSON.stringifiy(response.body) is not required to forward the response as it is. JSON.stringify needs to be removedgateway/src/handlers/streamHandler.ts
Lines 77 to 79 in 33b1122
The text was updated successfully, but these errors were encountered: