View source: R/app_chat_style.R
style_chat_history | R Documentation |
This function processes the chat history, filters out system messages, and formats the remaining messages with appropriate styling.
style_chat_history(history, ide_colors = get_ide_theme_info())
history |
A list of chat messages with elements containing 'role' and 'content'. |
ide_colors |
List containing the colors of the IDE theme. |
A list of formatted chat messages with styling applied, excluding system messages.
chat_history_example <- list(
list(role = "user", content = "Hello, World!"),
list(role = "system", content = "System message"),
list(role = "assistant", content = "Hi, how can I help?")
)
## Not run:
style_chat_history(chat_history_example)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.