-
Notifications
You must be signed in to change notification settings - Fork 17
feat(chat_append): Return stream results as promise value #45
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cpsievert
reviewed
May 13, 2025
cpsievert
reviewed
May 13, 2025
cpsievert
approved these changes
May 14, 2025
cpsievert
reviewed
May 14, 2025
gadenbuie
added a commit
that referenced
this pull request
May 16, 2025
* Increment version number to 0.2.0 * chore: Add update js assets to release bullets * chore: polish news * chore: revdepcheck::cloud_check() * chore: update cran comments * docs: update pkgdown site * chore: update shinychat.js * feat: Add shinychat hex logo * chore: update logo * feat: Use silent error in `chat_append()` to avoid crashing app (#46) * feat: Don't crash app with an error in `chat_append_stream()` * feat: Improve formatting of error message in chat * chore: Update news item * chore: remove unused code * fix: Avoid unhandled promise error, but still throw silent error * chore: update comment * tests(chat_append_stream): Handles errors in the stream * chore: Suggest {later} * feat(chat_append): Return stream results as promise value (#45) * feat(chat_append): Return stream results as value of promise * chore: more robust to future ellmer changes * docs: Add news item * chore: Use fastmap * tests(chat_append_stream): Promise resolves to stream contents * docs(chat_append): Document resolved promise value * chore: restore code changes * avoid warning about fastmap * rename: test-markdown-stream.R * chore: organize reference index * chore: Add Posit ROR id * ci: Run r-cmd-check on all pull requests * chore: Update shinychat.js assets * chore: Use branch with fix * tests: update snaps * chore: Garrick as maintainer
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently
chat_append()returns a promise that resolves when the stream is complete, but it resolves to a value ofNULLor an error if one occurs.This PR updates
chat_append_stream_impl()to collect the stream results and return them as the final value of the resolved promise.