PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.3.8
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.3.8
4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 4.2.1 All 138 releases
learnpress / config / settings / open-ai-admin.php

open-ai-admin.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.3.8, at config/settings/open-ai-admin.php

135 lines 5.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 return apply_filters(
3 'lp/settings/open-ai',
4 array_merge(
5 apply_filters(
6 'learn-press/course-settings-fields/single',
7 [
8 [
9 'title' => esc_html__( 'Open AI', 'learnpress' ),
10 'type' => 'title',
11 ],
12 [
13 'title' => esc_html__( 'Enable Open AI', 'learnpress' ),
14 'id' => 'enable_open_ai',
15 'default' => 'no',
16 'type' => 'checkbox',
17 'desc' => esc_html__( 'Enable this option and enter your OpenAI Secret key below to activate the feature.', 'learnpress' ),
18 ],
19 [
20 'title' => __( 'Secret key', 'learnpress' ),
21 'id' => 'open_ai_secret_key',
22 'default' => '',
23 'type' => 'textarea',
24 'desc' => sprintf(
25 /* translators: 1. profile url */
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>.',
29 'learnpress'
30 ),
31 'https://platform.openai.com/account/api-keys',
32 'https://platform.openai.com/docs/quickstart'
33 ),
34 ],
35 [
36 'title' => __( 'Text Model Type', 'learnpress' ),
37 'id' => 'open_ai_text_model_type',
38 'default' => 'gpt-4.1',
39 'type' => 'select',
40 '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' ),
52 ),
53 ],
54 [
55 'title' => __( 'Image Model Type', 'learnpress' ),
56 'id' => 'open_ai_image_model_type',
57 'default' => 'gpt-image-1',
58 'type' => 'select',
59 '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' ),
63 ),
64 ],
65 [
66 'title' => __( 'Frequency Penalty Level', 'learnpress' ),
67 'id' => 'open_ai_frequency_penalty_level',
68 'default' => '0.0',
69 'type' => 'select',
70 'options' => array(
71 '-2.0' => esc_html__( 'Very High Repetition (-2.0)', 'learnpress' ),
72 '-1.5' => esc_html__( 'High Repetition (-1.5)', 'learnpress' ),
73 '-1.0' => esc_html__( 'Moderate Repetition (-1.0)', 'learnpress' ),
74 '-0.5' => esc_html__( 'Low Repetition (-0.5)', 'learnpress' ),
75 '0.0' => esc_html__( 'No Penalty (0.0)', 'learnpress' ),
76 '0.5' => esc_html__( 'Low Penalty (0.5)', 'learnpress' ),
77 '1.0' => esc_html__( 'Moderate Penalty (1.0)', 'learnpress' ),
78 '1.5' => esc_html__( 'High Penalty (1.5)', 'learnpress' ),
79 '2.0' => esc_html__( 'Very High Penalty (2.0)', 'learnpress' ),
80 ),
81 ],
82 [
83 'title' => __( 'Presence Penalty Level', 'learnpress' ),
84 'id' => 'open_ai_presence_penalty_level',
85 'default' => '0.0',
86 'type' => 'select',
87 'options' => array(
88 '-2.0' => esc_html__( 'Very High Repetition Allowed (-2.0)', 'learnpress' ),
89 '-1.5' => esc_html__( 'High Repetition Allowed (-1.5)', 'learnpress' ),
90 '-1.0' => esc_html__( 'Moderate Repetition Allowed (-1.0)', 'learnpress' ),
91 '-0.5' => esc_html__( 'Low Repetition Allowed (-0.5)', 'learnpress' ),
92 '0.0' => esc_html__( 'No Penalty (0.0)', 'learnpress' ),
93 '0.5' => esc_html__( 'Low Penalty (0.5)', 'learnpress' ),
94 '1.0' => esc_html__( 'Moderate Penalty (1.0)', 'learnpress' ),
95 '1.5' => esc_html__( 'High Penalty (1.5)', 'learnpress' ),
96 '2.0' => esc_html__( 'Very High Penalty (2.0)', 'learnpress' ),
97 ),
98 ],
99 [
100 'title' => __( 'Creativity Level', 'learnpress' ),
101 'id' => 'open_ai_creativity_level',
102 'default' => '1.0',
103 'type' => 'select',
104 'options' => array(
105 '0.0' => esc_html__( 'Very Low Creativity (0.0)', 'learnpress' ),
106 '0.2' => esc_html__( 'Low Creativity (0.2)', 'learnpress' ),
107 '0.3' => esc_html__( 'Low Creativity (0.3)', 'learnpress' ),
108 '0.5' => esc_html__( 'Moderate Creativity (0.5)', 'learnpress' ),
109 '0.7' => esc_html__( 'High Creativity (0.7)', 'learnpress' ),
110 '0.8' => esc_html__( 'High Creativity (0.8)', 'learnpress' ),
111 '1.0' => esc_html__( 'Very High Creativity (1.0)', 'learnpress' ),
112 '1.1' => esc_html__( 'Extreme Creativity (1.1)', 'learnpress' ),
113 '1.5' => esc_html__( 'Extreme Creativity (1.5)', 'learnpress' ),
114 '2.0' => esc_html__( 'Maximum Creativity (2.0)', 'learnpress' ),
115 ),
116 ],
117 [
118 'title' => __( 'Max Token', 'learnpress' ),
119 'id' => 'open_ai_max_token',
120 'default' => 4000,
121 'type' => 'number',
122 'desc' => esc_html__( 'Set 0 for no limit.', 'learnpress' ),
123 'custom_attributes' => array(
124 'min' => 0,
125 'step' => 1,
126 ),
127 ],
128 [
129 'type' => 'sectionend',
130 ],
131 ]
132 ),
133 )
134 );
135