File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ Imports:
23
23
purrr,
24
24
rlang,
25
25
shiny,
26
- shinychat,
26
+ shinychat (>= 0.2.0) ,
27
27
whisker,
28
28
xtable
29
29
Encoding: UTF-8
Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ querychat_server <- function(id, querychat_config) {
175
175
append_output <- function (... ) {
176
176
txt <- paste0(... )
177
177
shinychat :: chat_append_message(
178
- session $ ns( " chat" ) ,
178
+ " chat" ,
179
179
list (role = " assistant" , content = txt ),
180
180
chunk = TRUE ,
181
181
operation = " append" ,
@@ -259,11 +259,11 @@ querychat_server <- function(id, querychat_config) {
259
259
# the chat model to see.
260
260
if (! is.null(greeting )) {
261
261
if (isTRUE(any(nzchar(greeting )))) {
262
- shinychat :: chat_append(session $ ns( " chat" ) , greeting )
262
+ shinychat :: chat_append(" chat" , greeting )
263
263
}
264
264
} else {
265
265
shinychat :: chat_append(
266
- session $ ns( " chat" ) ,
266
+ " chat" ,
267
267
chat $ stream_async(
268
268
" Please give me a friendly greeting. Include a few sample prompts in a two-level bulleted list."
269
269
)
@@ -274,7 +274,7 @@ querychat_server <- function(id, querychat_config) {
274
274
shiny :: observeEvent(input $ chat_user_input , {
275
275
# Add user message to the chat history
276
276
shinychat :: chat_append(
277
- session $ ns( " chat" ) ,
277
+ " chat" ,
278
278
chat $ stream_async(input $ chat_user_input )
279
279
)
280
280
})
You can’t perform that action at this time.
0 commit comments