-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Streamable functions - Continuation of #14395 #14465
New issue
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
Streamable functions - Continuation of #14395 #14465
Conversation
Add two tests to cover new API Add enum to handle response from stream Add extension to Callable for Streamable Content.
Add Enum to switch over response type Add New test to match new API design doc.
Add TODO note.
let callable: Callable<String, StreamResponse<String, String>> = functions.httpsCallable("genStream") | ||
let stream = callable.stream("genStream") | ||
//Todo fetch actual content. | ||
for try await response in stream { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eBlender, w.r.t. your comment about it not parsing it, is the issue that this is throwing a parsing error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is the part where we don't get a proper response.
Tried with another approach like the examples above and the genStream flow will work, but it seem that StreamRepsone<> is not it's cup of tea :(
Any other type that will do fine, <T, T> as examples above.
Callable<[Location], WeatherForecast> = functions.httpsCallable("genStreamWeather")
Accepted suggestion. Co-authored-by: Nick Cooke <[email protected]>
Accepted suggestion. Co-authored-by: Nick Cooke <[email protected]>
Accepted suggestion Co-authored-by: Nick Cooke <[email protected]>
Add placeholders so we can pass CI, while we finalize stream() functionality
caeff20
into
firebase:streamable-functions
Hey there! So you want to contribute to a Firebase SDK?
Before you file this pull request, please read these guidelines:
Discussion
If not, go file an issue about this before creating a pull request to discuss.
Testing
API Changes
us make Firebase APIs better, please propose your change in a feature request so that we
can discuss it together.