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
According to the documentation, $.respond() is supposed to be able to handle readable streams.
Sadly, the implementation seems broken, and the respond() wait for the entire stream to be cached before sending the response. This is despite the response's body including "body_streamed:true".
Send a POST request to the endpoint with
body = {
"html" : "Sam Harris is the author of five New York Times best sellers. His books include The End of Faith, Letter to a Christian Nation, The Moral Landscape, Free Will, Lying, Waking Up, and Islam and the Future of Tolerance (with Maajid Nawaz)."
}
You'll see that the audio is sent by the workflow only once the original stream from ElevenLab has been fully received.
The desired behaviour would be to start streaming as soon as the readable streams is passed to $.respond().
And here is the related part of the documentation:
The value of the body property can be either a string, object, a Buffer (opens new window)
(binary data), or a Readable stream (opens new window)
. Attempting to return any other data may yield an error.
In the case where you return a Readable stream:
You must await the $.respond function (await $.respond({ ... })
The stream must close and be finished reading within your workflow execution timeout.
You cannot return a Readable and use the immediate: true property of $.respond.
You can Copy this example workflow (opens new window)
and make an HTTP request to its endpoint URL to experiment with this.
Also, note that the link of the workflow mentioned in the documentation is broken.
The text was updated successfully, but these errors were encountered:
Hi @parisetflorian, would you mind sharing the steps in your workflow in more detail? Or could you create a shared link of your workflow so that we can copy it?
We're students at UT Austin looking for an issue to work on for our course project. We are interested in this issue and aim to raise PR and get it approved within a month. We will appreciate your help.
According to the documentation, $.respond() is supposed to be able to handle readable streams.
Sadly, the implementation seems broken, and the respond() wait for the entire stream to be cached before sending the response. This is despite the response's body including "body_streamed:true".
Here is my test workflow where you can reproduce the issue with :
https://pipedream.com/@insiderisk/projects/proj_zNsZnR/getaudio-p_13Claj9/inspect
Send a POST request to the endpoint with
body = {
"html" : "Sam Harris is the author of five New York Times best sellers. His books include The End of Faith, Letter to a Christian Nation, The Moral Landscape, Free Will, Lying, Waking Up, and Islam and the Future of Tolerance (with Maajid Nawaz)."
}
You'll see that the audio is sent by the workflow only once the original stream from ElevenLab has been fully received.
The desired behaviour would be to start streaming as soon as the readable streams is passed to $.respond().
And here is the related part of the documentation:
The value of the body property can be either a string, object, a Buffer
(opens new window)
(binary data), or a Readable stream
(opens new window)
. Attempting to return any other data may yield an error.
In the case where you return a Readable stream:$.respond function (await $ .respond({ ... })
You must await the
The stream must close and be finished reading within your workflow execution timeout.
You cannot return a Readable and use the immediate: true property of $.respond.
You can Copy this example workflow
(opens new window)
and make an HTTP request to its endpoint URL to experiment with this.
Also, note that the link of the workflow mentioned in the documentation is broken.
The text was updated successfully, but these errors were encountered: