Skip to content

Comments

feat: Add chat_app(), chat_mod_ui() and chat_mod_server()#36

Merged
gadenbuie merged 20 commits intomainfrom
feat/chat_app
Apr 4, 2025
Merged

feat: Add chat_app(), chat_mod_ui() and chat_mod_server()#36
gadenbuie merged 20 commits intomainfrom
feat/chat_app

Conversation

@gadenbuie
Copy link
Collaborator

For tidyverse/ellmer#397

  • Moves the implementation of ellmer::live_browser() to shinychat as shinychat::chat_app().

  • Adds a simple Shiny module, that can be initialized from a chat client or can be intialized in the same way as chat_ui(). The server-side logic connects the user input and wraps client$stream_async() |> chat_append().

The module also uses an ExtendedTask to avoid blocking reactivity; the docs include an example with simultaneous Claude/OpenAI chats that can run in parallel.

@gadenbuie gadenbuie requested review from cpsievert and jcheng5 April 2, 2025 15:07
@cpsievert
Copy link
Collaborator

LGTM, but would also be great to have @jcheng5's take, especially in regard to ExtendedTask and whether he'd be open to chat_append() using it (since it seems like it'll be necessary for prompting the user for input during tool execution)

@gadenbuie gadenbuie requested a review from jcheng5 April 3, 2025 21:19
@jcheng5 jcheng5 self-requested a review April 4, 2025 19:26
Co-authored-by: Joe Cheng <joe@posit.co>
@gadenbuie gadenbuie merged commit 8c788ac into main Apr 4, 2025
6 checks passed
@gadenbuie gadenbuie deleted the feat/chat_app branch April 4, 2025 20:20
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.

3 participants