From 0e4d560c40cc996f002f53f28e82741b46c05039 Mon Sep 17 00:00:00 2001 From: Charles Teh Date: Mon, 20 Nov 2023 01:23:27 +0800 Subject: [PATCH] Update (openai): fix broken field --- app/Helpers/FirstParty/OpenAI/OpenAI.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Helpers/FirstParty/OpenAI/OpenAI.php b/app/Helpers/FirstParty/OpenAI/OpenAI.php index 6cee4f0..ae2011f 100644 --- a/app/Helpers/FirstParty/OpenAI/OpenAI.php +++ b/app/Helpers/FirstParty/OpenAI/OpenAI.php @@ -13,7 +13,7 @@ public static function getArticleMeta($user_prompt, $model_max_tokens = 1536, $t $openai_config = 'openai-gpt-4-turbo'; - $system_prompt = "Based on given article, populate the following in valid JSON format\n{\n\"title\":\"(Title based on article)\",\n\"keywords\":[\"(Important keywords in 1-2 words per keyword)\"],\n\"category\":\"(Updates|Opinions|Features|New Launches|How Tos|Reviews)\",\n\"summary\":\"(Summarise article in 80-100 words to help readers understand what article is about)\",\n\"entities\":[(List of companies, brands that are considered as main entites in 1-2 words. per entity)],\n\"society_impact\":[\"(Explain how this article content's can impact society on AI and\/or technology aspect )\"],\n\"society_impact_level:\"(low|medium|high)\"\n}"; + $system_prompt = "Based on given article, populate the following in valid JSON format\n{\n\"title\":\"(Title based on article)\",\n\"keywords\":[\"(Important keywords in 1-2 words per keyword)\"],\n\"category\":\"(Updates|Opinions|Features|New Launches|How Tos|Reviews)\",\n\"summary\":\"(Summarise article in 80-100 words to help readers understand what article is about)\",\n\"entities\":[(List of companies, brands that are considered as main entites in 1-2 words. per entity)],\n\"society_impact\":\"(Explain how this article content's can impact society on AI and\/or technology aspect )\",\n\"society_impact_level:\"(low|medium|high)\"\n}"; return self::getChatCompletion($user_prompt, $system_prompt, $openai_config, $model_max_tokens, $timeout); }