Pending requests in the Usage Logs #73
-
|
Hi! Could you help me with understanding pending requests in the Usage Tab Logs? I have so many of them, and I don't know when status is changed to '101 OK' for all of them. This only applies to live-streaming transcription. Also, I noticed, that when I want to close my socket connection I can't just use something like this: // Client js
socket = new WebSocket('wss://api.deepgram.com/v1/listen?interim_results=true', [...]);
socket.close()This method closed the socket channel, but in the Usage Logs, I see 'Pending' status for this request. But if I use: socket.send(new Uint8Array(0));Everything is good in the Usage Logs. Now I can see audio duration and cost. So, my second question is how to close socket channel in the right way? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
@valentinkorzun Thanks for writing in with your question. We are working on a fix to handle the socket.send(JSON.stringify({ type: "CloseStream" })) |
Beta Was this translation helpful? Give feedback.
@valentinkorzun Thanks for writing in with your question. We are working on a fix to handle the
.close()call on our end. For now, you can call.send()withJSON.stringify({ type: "CloseStream" })in the body