if (FALSE) {
Sys.setenv(OPENAI_API_KEY = "Your API key")
history <- list(list('role' = 'system', 'content' = 'You are a helpful assistant.'),
list('role' = 'user', 'content' = 'Who won the world series in 2020?'))
chat4R_history(history)
}
Run the code above in your browser using DataLab