We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is your feature request related to a problem? Please describe.
Looking for SSE client side support. Namely, being able to consume an external resource which is using Server-Sent Events (link to spec).
Here's an example external resource which can be consumed via SSE: https://platform.openai.com/docs/api-reference/making-requests curl https://api.openai.com/v1/completions -H "Content-Type: application/json" -H "Authorization: Bearer YOUR_API_KEY" -d '{"model": "text-davinci-003", "prompt": "Write the code for how to do SSE in swift", "temperature": 0, "max_tokens": 400, "stream": true}'
For testing purposes, it would be ideal if this implementation also included Server side support for SSE, namely so you could output events via SSE.
Here's links to libraries that may be useful for implementing:
https://github.com/swift-server/async-http-client#streaming https://github.com/inaka/EventSource/blob/master/EventSource/EventSource.swift https://github.com/inaka/EventSource/blob/master/EventSource/EventStreamParser.swift
Describe the solution you'd like A Vapor package that can be used to consume SSE events (aka client-side) from an external API.
The text was updated successfully, but these errors were encountered:
@Joannis tagging you here for visibility.
Thanks absolute boatloads for taking a look at this.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Is your feature request related to a problem? Please describe.
Looking for SSE client side support. Namely, being able to consume an external resource which is using Server-Sent Events (link to spec).
Here's an example external resource which can be consumed via SSE:
https://platform.openai.com/docs/api-reference/making-requests
curl https://api.openai.com/v1/completions
-H "Content-Type: application/json"
-H "Authorization: Bearer YOUR_API_KEY"
-d '{"model": "text-davinci-003", "prompt": "Write the code for how to do SSE in swift", "temperature": 0, "max_tokens": 400, "stream": true}'
For testing purposes, it would be ideal if this implementation also included Server side support for SSE, namely so you could output events via SSE.
Here's links to libraries that may be useful for implementing:
https://github.com/swift-server/async-http-client#streaming
https://github.com/inaka/EventSource/blob/master/EventSource/EventSource.swift
https://github.com/inaka/EventSource/blob/master/EventSource/EventStreamParser.swift
Describe the solution you'd like
A Vapor package that can be used to consume SSE events (aka client-side) from an external API.
The text was updated successfully, but these errors were encountered: