Streaming request #3309
artursvonda
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
Hmm. You could return the initial value as But as it stands I don't think we're gonna add any official support for other things than start-end. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've seen approaches for streaming updates, but this is not about it. This is about streaming request – a request that returns data partially using Server Sent Events (https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events). We use it to stream for streaming GPT responses as they become available. In our case, these requests have clear start and end, they are not meant to be long-lived requests. Right now we use approach similar to web sockets, but because of that we lose "lifecycle" of request and have to manually keep track of whether we're still fetching or not. Ideally, there would be way to continuously update cache while fetching (in the
queryFn
function, for example). That could be achieved by supporting not only promises, but also generators for queryFn.Beta Was this translation helpful? Give feedback.
All reactions