The spec for SSE (which the OpenAI API uses for streaming the results back) doesn't officially support POST requests or request bodies, so re-implementing a 1-1 API on leap-server is... messy at best.
So, for now, these commits just use a lower-level interface to keep track of the download progress from the server using a traditional HTTP request and response. If need be, we can reimplement this using the SSE protocol, or simply have some post-processing code in LeapUtils.ts to imitate SSE responses. But this should work well enough for now.
Implemented a draft in
The spec for SSE (which the OpenAI API uses for streaming the results back) doesn't officially support POST requests or request bodies, so re-implementing a 1-1 API on
leap-server
is... messy at best.So, for now, these commits just use a lower-level interface to keep track of the download progress from the server using a traditional HTTP request and response. If need be, we can reimplement this using the SSE protocol, or simply have some post-processing code in
LeapUtils.ts
to imitate SSE responses. But this should work well enough for now.