This function creates a customizable system prompt based on user-defined parameters such as coding style, skill level, and task. It supports customization for specific use cases through a custom prompt option.
Arguments
- style
A character string indicating the preferred coding style. Valid values are "tidyverse", "base", "no preference". Defaults to
getOption(gptstudio.code_style)
.- skill
The self-described skill level of the programmer. Valid values are "beginner", "intermediate", "advanced", "genius". Defaults to
getOption(gptstudio.skill)
.- task
The specific task to be performed: "coding", "general", "advanced developer", or "custom". This influences the generated system prompt. Defaults to "coding".
- custom_prompt
An optional custom prompt string to be utilized when
task
is set to "custom". Default is NULL.- in_source
A logical indicating whether the instructions are intended for use in a source script. This parameter is required and must be explicitly set to TRUE or FALSE. Default is FALSE.