PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.8
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.8
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-description-course.php

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

64 lines 1.9 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 $title = $params['post-title'] ?? '';
11 $topic = $params['topic'] ?? '';
12 $goal = $params['goals'] ?? '';
13 $course_objective = trim( $params['course_objective'] ?? '' );
14
15 // AI Settings
16 $language = $params['language'] ?? 'English';
17 $audience = $params['audience'] ?? 'Students';
18 $tone = $params['tone'] ?? 'analytical';
19 $length = $params['length'] ?? 1000;
20 $outputs = $params['outputs'] ?? 1;
21
22 return <<<XML
23 <prompt>
24 <course_context>
25 <audience>
26 The target audience is: $audience
27 </audience>
28 <content_parameters>
29 <language>$language</language>
30 <tone>$tone</tone>
31 </content_parameters>
32 </course_context>
33
34 <task_instructions>
35 You are an expert course description creator.
36 Create a course description directly based on the following:
37 Course Title: {$title}
38 Topic: {$topic}
39 Paragraph number: 1
40 Goal: Course about Subject "$title", content have html like list, heading h3, paragraph to make content easy to read and eye-catching.
41
42 <structure_requirements>
43 - The description must be between 200 and {$length} words, and include one image on the content.
44 - Generate EXACTLY **{$outputs}** course description(s) in a JSON array.
45 - Each item MUST contain a relevant "item".
46 </structure_requirements>
47 </task_instructions>
48
49 <output_format>
50 - You MUST respond valid JSON array object.
51 - Do not include any introductory text, explanations, or markdown code fences like ```json.
52 - The JSON structure must strictly follow this example:
53 <json_example>
54 {
55 "results": [
56 { "item": "Compelling Course Description Here" },
57 { "item": "Another Engaging Description" }
58 ]
59 }
60 </json_example>
61 </output_format>
62 </prompt>
63 XML;
64