if (FALSE) {
# Start a new chat and save the chatlog ID
chatlog_id <- chat("Hello, how are you?")
# Regenerate the last response in the chat and display it in the console
regenerate(chatlog_id)
# Regenerate the last response in the chat and return it as a message
message <- regenerate(chatlog_id, output = "message")
print(message)
# Regenerate the last response in the chat and return it as a response object
response_object <- regenerate(chatlog_id, output = "response_object")
print(response_object)
}
Run the code above in your browser using DataLab