Chat History Import
chat.history.import
R Package "GenAI" Documentation
Last update: 2024/02/15
Usage
chat.history.import(genai.object, new.chat.history)
Arguments
genai.object
: A generative AI object containing necessary and correct information.new.chat.history
: A list containing a chat history in correct format.
Description
This function imports a chat history in list format to a generative AI object.
Details
Providing accurate and valid information for each argument is crucial for successful chat
generation by the generative AI model. If any parameter is incorrect, the function responds with an
error message based on the API feedback. To view all supported generative AI models, use the
function available.models
.
Examples
# Method 1 (recommended): use the pipe operator "%>%"
genai.model %>%
chat.history.import(new.chat.history = new.history)
# Method 2: use the reference operator "$"
genai.model$chat.history.import(new.chat.history = new.history)
# Method 3: use the function chat.history.import() directly
chat.history.import(genai.object = genai.model,
new.chat.history = new.history)