Update (openai): Fix token issues
This commit is contained in:
@@ -46,7 +46,7 @@ public static function writeArticle($title, $description, $article_type, $min, $
|
||||
|
||||
$user_prompt = "Title: {$title}\nDescription: {$description}\nArticleType: {$article_type}";
|
||||
|
||||
return self::chatCompletion($system_prompt, $user_prompt, 'gpt-3.5-turbo');
|
||||
return self::chatCompletion($system_prompt, $user_prompt, 'gpt-3.5-turbo', 1200);
|
||||
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ public static function createNewArticleTitle($current_title, $supporting_data)
|
||||
return in following json format {\"main_keyword\":\"(Main Keyword)\",\"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\":\"(Cliffhanger SEO description based on main keyword, do not start with action verb)\",\"photo_keywords\":[\"photo keyword 1\",\"photo keyword 2\"]}";
|
||||
|
||||
|
||||
$supporting_data = Str::substr($supporting_data,0, 2100);
|
||||
$supporting_data = Str::substr($supporting_data, 0, 2100);
|
||||
|
||||
$user_prompt = "Article Title: {$current_title}\n Article Description: {$supporting_data}\n";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user