initialize_messages: Initialize a new messages object for OpenAI API chat completions
Description
This function initializes a new messages object as a template for messages sent to the OpenAI API
https://api.openai.com/v1/chat/completions endpoint. By default, the template contains a single message from
the system to the user with the initial content "You are a helpful assistant.", but you can customize the content
by specifying a different value for the "initial_system_content" parameter.
Usage
initialize_messages(
initial_role = "system",
initial_content = "You are a helpful assistant."
)
Value
A data frame containing a single message from the system to the user, with columns for the
message role and content.
Arguments
initial_role
A character string representing the role issueing the initial content (per default: "system")
initial_content
A character string representing the initial message from the system