Skip to content
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

Update streaming callable API #1652

Merged
merged 5 commits into from
Dec 14, 2024
Merged

Update streaming callable API #1652

merged 5 commits into from
Dec 14, 2024

Conversation

inlined
Copy link
Member

@inlined inlined commented Dec 13, 2024

Changes the (not yet documented) streaming API for v2 Callable functions.

  1. CallableProxyResponse is now CallableResponse (to match CallableRequest)
  2. acceptsStreaming has been moved to CallableRequest because it is a request property
  3. CallableResponse.write has been renamed CallableResponse.sendChunk partially to match Genkit and partially to avoid confusion where "write" acts very differently (accepts raw data, has a callback)
  4. CallableResponse.sendChunk returns a Promise so that errors are no longer swallowed
  5. Adds a stream method though its implementation will come at a later date

@inlined inlined requested a review from taeold December 13, 2024 21:41
Copy link
Contributor

@taeold taeold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changelog?

@inlined inlined force-pushed the inlined.streaming-changes branch from 004787c to 702719d Compare December 14, 2024 18:42
@inlined inlined enabled auto-merge December 14, 2024 18:44
@inlined inlined added this pull request to the merge queue Dec 14, 2024
Merged via the queue into master with commit da95919 Dec 14, 2024
13 checks passed
@inlined inlined deleted the inlined.streaming-changes branch December 15, 2024 01:21
Berlioz pushed a commit that referenced this pull request Dec 19, 2024
* Update streaming callable API

* Fix linter error

* Stream type defaults to unknown

* Changelog

* Format fix
github-merge-queue bot pushed a commit that referenced this pull request Dec 19, 2024
…n top-level awaits (#1651)

* Use await import instead of require for functions modules that contain top-level awaits

* tests ensuring that es modules with top level awaits can be loaded

* adds node 22 to the CI matrix on github

* Add support for an authPolicy that returns Permission Denied when failed (#1650)

* Add support for an authPolicy that returns Permission Denied when failed

* Formatter

* Changelog

* remove ignorant comment

* Update streaming callable API (#1652)

* Update streaming callable API

* Fix linter error

* Stream type defaults to unknown

* Changelog

* Format fix

* update changelog.md

---------

Co-authored-by: Thomas Bouldin <inlined@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants