diff --git a/app/Helpers/FirstParty/OpenAI/OpenAI.php b/app/Helpers/FirstParty/OpenAI/OpenAI.php index ecae975..e4daf9e 100644 --- a/app/Helpers/FirstParty/OpenAI/OpenAI.php +++ b/app/Helpers/FirstParty/OpenAI/OpenAI.php @@ -10,11 +10,11 @@ class OpenAI { public static function writeProductArticle($excerpt, $photos) { - $excerpt = substr($excerpt, 0, 900); + //$excerpt = substr($excerpt, 0, 900); $system_prompt = ' - You are tasked with writing a comprehensive product introduction article using the provided excerpt. The emphasis should be on the performance, features, and notable aspects of the product. The review should avoid the use of personal pronouns and must not delve into marketplace-related information. Return the output in the following json format:\n\n - {"title": "(Article Title)","excerpt": "(One sentence summary, 150-160 characters of an article, do not use start sentence with verb.)","cliffhanger": "(One sentence 70-80 characters of article, cliff-hanging sentence to attract readers)","body": "(Markdown format, 700-900 word count)"}\n\n + You are tasked with writing a comprehensive product introduction & review article using the provided excerpt. Write as if you are reviewing the product by a third party, but no pronouns.The emphasis should be on the performance, features, and notable aspects of the product. The review must not delve into marketplace-related information. Return the output in the following json format:\n\n + {"title": "(Article Title, start with product name, 60-70 characters)","excerpt": "(One sentence summary, 150-160 characters of an article, do not use start sentence with verb.)","cliffhanger": "(One sentence 70-80 characters of article, cliff-hanging sentence to attract readers)","body": "(Markdown format, 700-900 word count)"}\n\n Mandatory Requirements:\n - Write in US grade 8-9 English\n - Use the following sections whenever applicable:\n @@ -39,7 +39,7 @@ public static function writeProductArticle($excerpt, $photos) } } - $output = (self::chatCompletion($system_prompt, $user_prompt, 'gpt-3.5-turbo', 2500)); + $output = (self::chatCompletion($system_prompt, $user_prompt, 'gpt-3.5-turbo', 4000)); // dump($user_prompt); // dd($output);