PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.9
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.9
4.4.9 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 All 140 releases
← All changes | config/settings/openAi/prompt-create-image-course.php +36 -36 4.3.8 → 4.4.9 View file →
@@ -1,36 +1,36 @@
1 -<?php
2 -/**
3 - * Prompt to create a course
4 - */
5 -if ( ! isset( $params ) ) {
6 - return;
7 -}
8 -
9 -$model_type = LP_Settings::get_option( 'open_ai_image_model_type', 'gpt-image-1' );
10 -
11 -// Course Intent
12 -$title = wp_trim_words( $params['post-title'] ?? '', 100 );
13 -$language = $params['language'] ?? 'English';
14 -$quality = $params['quality'] ?? 'auto';
15 -//$size = $params['size'] ?? '256x256';
16 -//$outputs = $params['outputs'] ?? 1;
17 -$style = $params['style'] ?? 'Impressionism';
18 -$goal = wp_trim_words( $params['goal'] ?? '', 850 );
19 -
20 -$main_subject = ! empty( $goal ) ? "The main subject of the image must be: $goal." : '';
21 -$title = ! empty( $title ) ? "The image should be inspired by the course title: $title." : '';
22 -
23 -/**
24 - *A text description of the desired image(s).
25 - * The maximum length is 32000 characters for gpt-image-1,
26 - * 1000 characters for dall-e-2
27 - * and 4000 characters for dall-e-3.
28 - */
29 -
30 -return <<<PROMPT
31 -Create a feature image for an online course. With the following details:
32 -$main_subject
33 -$title
34 -
35 -The desired artistic style is: $style.
36 -PROMPT;
1 +<?php
2 +/**
3 + * Prompt to create a course
4 + */
5 +if ( ! isset( $params ) ) {
6 + return;
7 +}
8 +
9 +$model_type = LP_Settings::get_option( 'open_ai_image_model_type', 'gpt-image-1' );
10 +
11 +// Course Intent
12 +$title = wp_trim_words( $params['post-title'] ?? '', 100 );
13 +$language = $params['language'] ?? 'English';
14 +$quality = $params['quality'] ?? 'auto';
15 +//$size = $params['size'] ?? '256x256';
16 +//$outputs = $params['outputs'] ?? 1;
17 +$style = $params['style'] ?? 'Impressionism';
18 +$goal = wp_trim_words( $params['goal'] ?? '', 850 );
19 +
20 +$main_subject = ! empty( $goal ) ? "The main subject of the image must be: $goal." : '';
21 +$title = ! empty( $title ) ? "The image should be inspired by the course title: $title." : '';
22 +
23 +/**
24 + * A text description of the desired image(s).
25 + * The maximum length is 32000 characters for gpt-image-1,
26 + * 1000 characters for dall-e-2
27 + * and 4000 characters for dall-e-3.
28 + */
29 +
30 +return <<<PROMPT
31 +Create a feature image for an online course. With the following details:
32 +$main_subject
33 +$title
34 +
35 +The desired artistic style is: $style.
36 +PROMPT;