Skip to content

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

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
merged 20 commits into from
Apr 4, 2025

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
@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