← All changes
|
config/settings/openAi/prompt-create-description-course.php
+63
-63
4.3.8
→
4.4.9
View file →
| @@ -1,63 +1,63 @@ | ||
| 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; | |
| 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; | |