You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chat_client=chatlas.ChatOpenAI(model="gpt-4o-mini")
# Create and display a Shiny chat componentchat=ui.Chat(
id="chat",
messages=[
{"role": "assistant", "content": "Hello! How can I help you today?"}
],
)
chat.ui()
chat.enable_bookmarking(
client=chat_client,
# ONLY for ChatExpress. For core Chat, use the `App` directlybookmark_store="url",
)
chat.enable_bookmarking() TODOs
Exclude the chat user input from bookmarking
Add a on_bookmark hook
Add a on_restore hook
Adjust default messages to be ignored if restoration occurs.
For express mode only, add parameter bookmark_store: BookmarkStore to reduce code burden in express mode
Add a parameter for "on session disconnect, update the query string" as a last-ditch-effort to save the chat state; On restore of this state, reset the query string if there was no query string before the last-ditch-effort.
Do NOT: register on_bookmarked to update query string automatically
Do NOT: register effect to bookmark when .messages() updates. This should be done through templating to give Authors freedom
Category
UI Components
Scope
Minor Enhancement
Problem
Chat doesn't restore from bookmarked state. It'd be nice to have this feature!
Solution
It should store information in the bookmark state (values?)
Last chat input value should be ignored.
Related R implementation: posit-dev/shinychat#28
Alternatives (Optional)
No response
Example (Optional)
Impact (Optional)
No response
Contribution? (Optional)
Yes, I can implement (or help).
The text was updated successfully, but these errors were encountered: