style_chat_history {gptstudio} | R Documentation |
Style Chat History
Description
This function processes the chat history, filters out system messages, and formats the remaining messages with appropriate styling.
Usage
style_chat_history(history, ide_colors = get_ide_theme_info())
Arguments
history |
A list of chat messages with elements containing 'role' and 'content'. |
ide_colors |
List containing the colors of the IDE theme. |
Value
A list of formatted chat messages with styling applied, excluding system messages.
Examples
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)
[Package gptstudio version 0.4.0 Index]