-
Notifications
You must be signed in to change notification settings - Fork 19
Closed
Milestone
Description
I missed that ?chat_append() included instructions for handling the rejected promise. (In my defense, I don't think I'm alone in this.)
Lines 172 to 180 in 98973d3
| #' # Error handling | |
| #' | |
| #' If the `response` argument is a generator, promise, or promise generator, and | |
| #' an error occurs while producing the message (e.g., an iteration in | |
| #' `stream_async` fails), the promise returned by `chat_append` will reject with | |
| #' the error. If the `chat_append` call is the last expression in a Shiny | |
| #' observer, Shiny will see that the observer failed, and end the user session. | |
| #' If you prefer to handle the error gracefully, use [promises::catch()] on the | |
| #' promise returned by `chat_append`. |
The general idea is still correct, except that the error no longer brings down the app.
Metadata
Metadata
Assignees
Labels
No labels