Update (ai)
This commit is contained in:
@@ -57,15 +57,15 @@ public static function suggestArticleTitles($current_title, $supporting_data, $s
|
|||||||
|
|
||||||
return in following json format {\"main_keyword\":\"(Main Keyword)\",\"suggestions\":[{\"title\":\"(Title in 90-130 letters)\",\"short_title\":\"(Short Title in 30-40 letters)\",\"article_type\":\"(How-tos|Guides|Interview|Review|Commentary|Feature|News|Editorial|Report|Research|Case-study|Overview|Tutorial|Update|Spotlight|Insights)\",\"description\":\"(SEO description based on main keyword)\",\"photo_keywords\":[\"photo keyword 1\",\"photo keyword 2\"]}]}";
|
return in following json format {\"main_keyword\":\"(Main Keyword)\",\"suggestions\":[{\"title\":\"(Title in 90-130 letters)\",\"short_title\":\"(Short Title in 30-40 letters)\",\"article_type\":\"(How-tos|Guides|Interview|Review|Commentary|Feature|News|Editorial|Report|Research|Case-study|Overview|Tutorial|Update|Spotlight|Insights)\",\"description\":\"(SEO description based on main keyword)\",\"photo_keywords\":[\"photo keyword 1\",\"photo keyword 2\"]}]}";
|
||||||
|
|
||||||
$user_prompt = "Article Title: {$current_title}";
|
$user_prompt = "Article Title: {$current_title}\n Article Description: {$supporting_data}\n";
|
||||||
|
|
||||||
$reply = self::chatCompletion($system_prompt, $current_title, 'gpt-3.5-turbo');
|
$reply = self::chatCompletion($system_prompt, $user_prompt, 'gpt-3.5-turbo');
|
||||||
|
|
||||||
// try {
|
try {
|
||||||
return json_decode($reply, false);
|
return json_decode($reply, false);
|
||||||
// } catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
// return null;
|
return null;
|
||||||
// }
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user