Add (news bites)
This commit is contained in:
@@ -8,6 +8,16 @@
|
||||
|
||||
class OpenAI
|
||||
{
|
||||
public static function getRssPostMeta($user_prompt, $model_max_tokens = 1536, $timeout = 60)
|
||||
{
|
||||
|
||||
$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 60-90 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 in 30-50 words how this article content's can impact society on technological aspect)\",\n\"society_impact_level:\"(low|medium|high)\"\n}";
|
||||
|
||||
return self::getChatCompletion($user_prompt, $system_prompt, $openai_config, $model_max_tokens, $timeout);
|
||||
}
|
||||
|
||||
public static function getArticleMeta($user_prompt, $model_max_tokens = 1536, $timeout = 60)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user