Skip to content

Conversation

eBlender
Copy link
Contributor

Hey there! So you want to contribute to a Firebase SDK?
Before you file this pull request, please read these guidelines:

Discussion

  • Read the contribution guidelines (CONTRIBUTING.md).
  • If this has been discussed in an issue, make sure to link to the issue here.
    If not, go file an issue about this before creating a pull request to discuss.

Testing

  • Make sure all existing tests in the repository pass after your change.
  • If you fixed a bug or added a feature, add a new test to cover your code.

API Changes

  • At this time we cannot accept changes that affect the public API. If you'd like to help
    us make Firebase APIs better, please propose your change in a feature request so that we
    can discuss it together.

eBlender and others added 3 commits February 11, 2025 21:27
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.
@ncooke3 ncooke3 changed the base branch from main to streamable-functions February 18, 2025 19:24
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 {
Copy link
Member

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?

Copy link
Contributor Author

@eBlender eBlender Feb 18, 2025

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")

eBlender and others added 4 commits February 18, 2025 13:30
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
@ncooke3 ncooke3 marked this pull request as ready for review February 19, 2025 19:47
@ncooke3 ncooke3 merged commit caeff20 into firebase:streamable-functions Feb 19, 2025
37 of 38 checks passed
@eBlender eBlender deleted the streamable-functions branch February 20, 2025 01:40
@eBlender eBlender restored the streamable-functions branch February 24, 2025 23:50
@firebase firebase locked and limited conversation to collaborators Mar 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants