Prints the conversation if verbose is TRUE. No return value.
Arguments
message
A string containing the message to be sent to the model.
api_key
A string containing the OpenAI API key. Default is retrieved from the system environment variable "OPENAI_API_KEY".
system_set
A string containing the system_set for the conversation. Default is an empty string.
ConversationBufferWindowMemory_k
An integer representing the conversation buffer window memory. Default is 2.
Model
A string representing the model to be used. Default is "gpt-4o-mini".
language
A string representing the language to be used in the conversation. Default is "English".
initialization
A logical flag to initialize a new conversation. Default is FALSE.
verbose
A logical flag to print the conversation. Default is TRUE.
Author
Satoshi Kume
Details
Conversation Interface for R with OpenAI
This function provides an interface to communicate with OpenAI's models using R. It maintains a conversation history and allows for initialization of a new conversation.