feat(pkg-r): Update module return value #130
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updates
chat_mod_server()
to return a list of values including:last_input
: A reactive value containing the last user input.last_turn
: A reactive value containing the last assistant turn.update_user_input()
: A function to update the chat input or submit a new user input. Takes the same arguments as [update_chat_user_input()], except forid
andsession
, which are supplied automatically.clear()
: A function to clear the chat history and the chat UI. Takes a single argument,clear_history
, which indicates whether to also clear the chat history in theclient
object. Defaults toTRUE
.client
: The chat client object, which is mutated as you chat.Example app