Nothing
#' @noRd
genai.openai.chat.history.import = function(genai.openai.object,
new.chat.history) {
# Imported chat history is a list
if (is.list(new.chat.history)) {
expected.format = list(
role = NA,
content = NA
)
for (message in new.chat.history) {
if (!identical(names(message), names(expected.format)) ||
!is.character(message$role) ||
!is.character(message$content)) {
stop("Invalid value for new.chat.history. Please make sure the format of the imported chat history is correct.")
}
}
genai.openai.object$chat.history$messages = new.chat.history
}
else {
stop("Invalid new.chat.history. Please make sure it is a list.")
}
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.