Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion r-package/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Imports:
purrr,
rlang,
shiny,
shinychat,
shinychat (>= 0.2.0),
whisker,
xtable
Encoding: UTF-8
Expand Down
8 changes: 4 additions & 4 deletions r-package/R/querychat.R
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ querychat_server <- function(id, querychat_config) {
append_output <- function(...) {
txt <- paste0(...)
shinychat::chat_append_message(
session$ns("chat"),
"chat",
list(role = "assistant", content = txt),
chunk = TRUE,
operation = "append",
Expand Down Expand Up @@ -259,11 +259,11 @@ querychat_server <- function(id, querychat_config) {
# the chat model to see.
if (!is.null(greeting)) {
if (isTRUE(any(nzchar(greeting)))) {
shinychat::chat_append(session$ns("chat"), greeting)
shinychat::chat_append("chat", greeting)
}
} else {
shinychat::chat_append(
session$ns("chat"),
"chat",
chat$stream_async(
"Please give me a friendly greeting. Include a few sample prompts in a two-level bulleted list."
)
Expand All @@ -274,7 +274,7 @@ querychat_server <- function(id, querychat_config) {
shiny::observeEvent(input$chat_user_input, {
# Add user message to the chat history
shinychat::chat_append(
session$ns("chat"),
"chat",
chat$stream_async(input$chat_user_input)
)
})
Expand Down