| @@ -5,20 +5,20 @@ | ||
| 5 | 5 | apply_filters( |
| 6 | 6 | 'learn-press/course-settings-fields/single', |
| 7 | 7 | [ |
| 8 | 8 | [ |
| 9 | - 'title' => esc_html__( 'Open AI', 'learnpress' ), | |
| 9 | + 'title' => esc_html__( 'OpenAI', 'learnpress' ), | |
| 10 | 10 | 'type' => 'title', |
| 11 | 11 | ], |
| 12 | 12 | [ |
| 13 | - 'title' => esc_html__( 'Enable Open AI', 'learnpress' ), | |
| 13 | + 'title' => esc_html__( 'Enable OpenAI', 'learnpress' ), | |
| 14 | 14 | 'id' => 'enable_open_ai', |
| 15 | 15 | 'default' => 'no', |
| 16 | 16 | 'type' => 'checkbox', |
| 17 | - 'desc' => esc_html__( 'Enable this option and enter your OpenAI Secret key below to activate the feature.', 'learnpress' ), | |
| 17 | + 'desc' => esc_html__( 'Enable this option and enter your OpenAI secret key below to activate this feature.', 'learnpress' ), | |
| 18 | 18 | ], |
| 19 | 19 | [ |
| 20 | - 'title' => __( 'Secret key', 'learnpress' ), | |
| 20 | + 'title' => __( 'Secret Key', 'learnpress' ), | |
| 21 | 21 | 'id' => 'open_ai_secret_key', |
| 22 | 22 | 'default' => '', |
| 23 | 23 | 'type' => 'textarea', |
| 24 | 24 | 'desc' => sprintf( |
| @@ -23,10 +23,9 @@ | ||
| 23 | 23 | 'type' => 'textarea', |
| 24 | 24 | 'desc' => sprintf( |
| 25 | 25 | /* translators: 1. profile url */ |
| 26 | 26 | __( |
| 27 | - 'Get your Open AI secret key from <a href="%1$s" target="_blank">here</a>. | |
| 28 | - Read more guide from <a href="%2$s" target="_blank">here</a>.', | |
| 27 | + 'Get your OpenAI secret key <a href="%1$s" target="_blank" rel="noopener noreferrer">here</a>. Read the quickstart guide <a href="%2$s" target="_blank" rel="noopener noreferrer">here</a>.', | |
| 29 | 28 | 'learnpress' |
| 30 | 29 | ), |
| 31 | 30 | 'https://platform.openai.com/account/api-keys', |
| 32 | 31 | 'https://platform.openai.com/docs/quickstart' |
| @@ -32,39 +31,37 @@ | ||
| 32 | 31 | 'https://platform.openai.com/docs/quickstart' |
| 33 | 32 | ), |
| 34 | 33 | ], |
| 35 | 34 | [ |
| 36 | - 'title' => __( 'Text Model Type', 'learnpress' ), | |
| 35 | + 'title' => __( 'Text Model', 'learnpress' ), | |
| 37 | 36 | 'id' => 'open_ai_text_model_type', |
| 38 | 37 | 'default' => 'gpt-4.1', |
| 39 | 38 | 'type' => 'select', |
| 40 | 39 | 'options' => array( |
| 41 | - 'gpt-5.2' => esc_html__( 'ChatGPT 5.2', 'learnpress' ), | |
| 42 | - 'gpt-5' => esc_html__( 'ChatGPT 5', 'learnpress' ), | |
| 43 | - 'gpt-5-mini' => esc_html__( 'ChatGPT 5 mini', 'learnpress' ), | |
| 44 | - 'gpt-5-nano' => esc_html__( 'ChatGPT 5 nano', 'learnpress' ), | |
| 45 | - 'gpt-4.1' => esc_html__( 'ChatGPT 4.1', 'learnpress' ), | |
| 46 | - //'chatgpt-4o-latest' => esc_html__( 'ChatGPT 4o-Latest', 'learnpress' ), | |
| 47 | - 'gpt-4o' => esc_html__( 'GPT 4o', 'learnpress' ), | |
| 48 | - 'gpt-4o-mini' => esc_html__( 'GPT 4o Mini', 'learnpress' ), | |
| 49 | - 'gpt-4' => esc_html__( 'GPT 4', 'learnpress' ), | |
| 50 | - 'gpt-3.5-turbo' => esc_html__( 'GPT 3.5 Turbo', 'learnpress' ), | |
| 51 | - 'gpt-3.5-turbo-instruct' => esc_html__( 'GPT 3.5 Turbo Instruct', 'learnpress' ), | |
| 40 | + 'gpt-5.6' => esc_html__( 'GPT-5.6', 'learnpress' ), | |
| 41 | + 'gpt-5.5' => esc_html__( 'GPT-5.5', 'learnpress' ), | |
| 42 | + 'gpt-5.4' => esc_html__( 'GPT-5.4', 'learnpress' ), | |
| 43 | + 'gpt-5.3' => esc_html__( 'GPT-5.3', 'learnpress' ), | |
| 44 | + 'gpt-5.2' => esc_html__( 'GPT-5.2', 'learnpress' ), | |
| 45 | + 'gpt-5.1' => esc_html__( 'GPT-5.1', 'learnpress' ), | |
| 46 | + 'gpt-5' => esc_html__( 'GPT-5', 'learnpress' ), | |
| 47 | + 'gpt-5-mini' => esc_html__( 'GPT-5 Mini', 'learnpress' ), | |
| 48 | + 'gpt-5-nano' => esc_html__( 'GPT-5 Nano', 'learnpress' ), | |
| 49 | + 'gpt-4.1' => esc_html__( 'GPT-4.1', 'learnpress' ), | |
| 52 | 50 | ), |
| 53 | 51 | ], |
| 54 | 52 | [ |
| 55 | - 'title' => __( 'Image Model Type', 'learnpress' ), | |
| 53 | + 'title' => __( 'Image Model', 'learnpress' ), | |
| 56 | 54 | 'id' => 'open_ai_image_model_type', |
| 57 | 55 | 'default' => 'gpt-image-1', |
| 58 | 56 | 'type' => 'select', |
| 59 | 57 | 'options' => array( |
| 60 | - 'gpt-image-1' => esc_html__( 'GPT image 1', 'learnpress' ), | |
| 61 | - 'dall-e-3' => esc_html__( 'DALL E 3', 'learnpress' ), | |
| 62 | - 'dall-e-2' => esc_html__( 'DALL E 2 ', 'learnpress' ), | |
| 58 | + 'gpt-image-1' => esc_html__( 'GPT Image 1', 'learnpress' ), | |
| 59 | + 'gpt-image-2' => esc_html__( 'GPT Image 2', 'learnpress' ), | |
| 63 | 60 | ), |
| 64 | 61 | ], |
| 65 | 62 | [ |
| 66 | - 'title' => __( 'Frequency Penalty Level', 'learnpress' ), | |
| 63 | + 'title' => __( 'Frequency Penalty', 'learnpress' ), | |
| 67 | 64 | 'id' => 'open_ai_frequency_penalty_level', |
| 68 | 65 | 'default' => '0.0', |
| 69 | 66 | 'type' => 'select', |
| 70 | 67 | 'options' => array( |
| @@ -79,9 +76,9 @@ | ||
| 79 | 76 | '2.0' => esc_html__( 'Very High Penalty (2.0)', 'learnpress' ), |
| 80 | 77 | ), |
| 81 | 78 | ], |
| 82 | 79 | [ |
| 83 | - 'title' => __( 'Presence Penalty Level', 'learnpress' ), | |
| 80 | + 'title' => __( 'Presence Penalty', 'learnpress' ), | |
| 84 | 81 | 'id' => 'open_ai_presence_penalty_level', |
| 85 | 82 | 'default' => '0.0', |
| 86 | 83 | 'type' => 'select', |
| 87 | 84 | 'options' => array( |
| @@ -114,17 +111,77 @@ | ||
| 114 | 111 | '2.0' => esc_html__( 'Maximum Creativity (2.0)', 'learnpress' ), |
| 115 | 112 | ), |
| 116 | 113 | ], |
| 117 | 114 | [ |
| 118 | - 'title' => __( 'Max Token', 'learnpress' ), | |
| 115 | + 'title' => __( 'Max Tokens', 'learnpress' ), | |
| 119 | 116 | 'id' => 'open_ai_max_token', |
| 120 | 117 | 'default' => 4000, |
| 121 | 118 | 'type' => 'number', |
| 122 | - 'desc' => esc_html__( 'Set 0 for no limit.', 'learnpress' ), | |
| 119 | + 'desc' => esc_html__( 'Set to 0 for no limit.', 'learnpress' ), | |
| 123 | 120 | 'custom_attributes' => array( |
| 124 | 121 | 'min' => 0, |
| 125 | 122 | 'step' => 1, |
| 126 | 123 | ), |
| 124 | + ], | |
| 125 | + [ | |
| 126 | + 'type' => 'sectionend', | |
| 127 | + ], | |
| 128 | + [ | |
| 129 | + 'title' => esc_html__( 'AI Assistant', 'learnpress' ), | |
| 130 | + 'type' => 'title', | |
| 131 | + ], | |
| 132 | + [ | |
| 133 | + 'title' => esc_html__( 'Enable AI Assistant', 'learnpress' ), | |
| 134 | + 'id' => 'ai_assistant_enabled', | |
| 135 | + 'default' => 'no', | |
| 136 | + 'type' => 'checkbox', | |
| 137 | + 'desc' => esc_html__( 'Enable the AI Assistant for learners on lesson pages. Requires OpenAI to be enabled and a valid secret key.', 'learnpress' ), | |
| 138 | + ], | |
| 139 | + [ | |
| 140 | + 'title' => esc_html__( 'Enable Free Chat', 'learnpress' ), | |
| 141 | + 'id' => 'ai_assistant_free_chat', | |
| 142 | + 'default' => 'no', | |
| 143 | + 'type' => 'checkbox', | |
| 144 | + 'desc' => esc_html__( 'Allow learners to type free-form questions. When disabled, only quick action buttons are shown.', 'learnpress' ), | |
| 145 | + ], | |
| 146 | + [ | |
| 147 | + 'title' => esc_html__( 'Enable Summarize Lesson', 'learnpress' ), | |
| 148 | + 'id' => 'ai_assistant_summarize_enabled', | |
| 149 | + 'default' => 'yes', | |
| 150 | + 'type' => 'checkbox', | |
| 151 | + 'desc' => esc_html__( 'Allow learners to use the Summarize Lesson action.', 'learnpress' ), | |
| 152 | + ], | |
| 153 | + [ | |
| 154 | + 'title' => esc_html__( 'Enable Explain Concept', 'learnpress' ), | |
| 155 | + 'id' => 'ai_assistant_explain_enabled', | |
| 156 | + 'default' => 'yes', | |
| 157 | + 'type' => 'checkbox', | |
| 158 | + 'desc' => esc_html__( 'Allow learners to use the Explain Concept action.', 'learnpress' ), | |
| 159 | + ], | |
| 160 | + [ | |
| 161 | + 'title' => esc_html__( 'Enable Quick Quiz', 'learnpress' ), | |
| 162 | + 'id' => 'ai_assistant_quick_quiz_enabled', | |
| 163 | + 'default' => 'yes', | |
| 164 | + 'type' => 'checkbox', | |
| 165 | + 'desc' => esc_html__( 'Allow learners to start and continue quick quizzes.', 'learnpress' ), | |
| 166 | + ], | |
| 167 | + [ | |
| 168 | + 'title' => esc_html__( 'Enable Smart Review', 'learnpress' ), | |
| 169 | + 'id' => 'ai_assistant_smart_review_enabled', | |
| 170 | + 'default' => 'yes', | |
| 171 | + 'type' => 'checkbox', | |
| 172 | + 'desc' => esc_html__( 'Allow learners to use the Smart Review action.', 'learnpress' ), | |
| 173 | + ], | |
| 174 | + [ | |
| 175 | + 'title' => esc_html__( 'Max Usage Tokens Per Day', 'learnpress' ), | |
| 176 | + 'id' => 'ai_assistant_max_usage_tokens_per_day', | |
| 177 | + 'default' => 0, | |
| 178 | + 'type' => 'number', | |
| 179 | + 'desc' => esc_html__( 'Maximum total AI tokens each learner can use per day. Set to 0 for no limit.', 'learnpress' ), | |
| 180 | + 'custom_attributes' => [ | |
| 181 | + 'min' => 0, | |
| 182 | + 'step' => 1, | |
| 183 | + ], | |
| 127 | 184 | ], |
| 128 | 185 | [ |
| 129 | 186 | 'type' => 'sectionend', |
| 130 | 187 | ], |