PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.3
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.3
4.4.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 All 139 releases
learnpress / config / settings / openAi / prompt-create-title-course.php

prompt-create-title-course.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.4.3, at config/settings/openAi/prompt-create-title-course.php

60 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Prompt to create a course
4 */
5 if ( ! isset( $params ) ) {
6 return;
7 }
8
9 // Course Intent
10 $topic = $params['topic'] ?? '';
11 $goal = $params['goals'] ?? '';
12 $course_objective = trim( $params['course_objective'] ?? '' );
13
14 // AI Settings
15 $language = $params['language'] ?? 'English';
16 $audience = $params['audience'] ?? 'Students';
17 $tone = $params['tone'] ?? 'analytical';
18 $length = $params['length'] ?? 60;
19 $outputs = $params['outputs'] ?? 1;
20
21 return <<<XML
22 <prompt>
23 <course_context>
24 <audience>
25 The target audience is: $audience
26 </audience>
27 <content_parameters>
28 <language>$language</language>
29 <tone>$tone</tone>
30 </content_parameters>
31 </course_context>
32
33 <task_instructions>
34 You are an expert course title creator.
35 Create a concise, compelling course title with the following details:
36 - Topic: {$topic}
37 - Goal: {$goal}
38
39 <structure_requirements>
40 - The title must not exceed {$length} characters.
41 - Generate EXACTLY **{$outputs}** course title(s) in a JSON array.
42 </structure_requirements>
43 </task_instructions>
44
45 <output_format>
46 - You MUST respond valid JSON array object.
47 - Do not include any introductory text, explanations, or markdown code fences like ```json.
48 - The JSON structure must strictly follow this example:
49 <json_example>
50 {
51 "results": [
52 { "item": "Compelling Course Title Here" },
53 { "item": "Another Engaging Title" }
54 ]
55 }
56 </json_example>
57 </output_format>
58 </prompt>
59 XML;
60