From 848b9bb6ad4e9948f2bcd8d7f96c116fdb8384d9 Mon Sep 17 00:00:00 2001 From: Kye Date: Fri, 24 Nov 2023 12:47:55 -0800 Subject: [PATCH 1/2] positive med --- playground/demos/positive_med/positive_med.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/playground/demos/positive_med/positive_med.py b/playground/demos/positive_med/positive_med.py index 0463a9bc..c0652a7d 100644 --- a/playground/demos/positive_med/positive_med.py +++ b/playground/demos/positive_med/positive_med.py @@ -15,13 +15,14 @@ Distribution Agent: - Social Media posts for the article. # TODO +- Make prompts better - Add shorter and better topic generator prompt - Optimize writer prompt to create longer and more enjoyeable blogs - Use Local Models like Storywriter """ from termcolor import colored from swarms.models import OpenAIChat -from swarms.prompts.autobloggen +from swarms.prompts.autobloggen import ( DRAFT_AGENT_SYSTEM_PROMPT, REVIEW_PROMPT, SOCIAL_MEDIA_SYSTEM_PROMPT_AGENT, From d92fde82b01fd5fb9e2a958b06aa343fa3081580 Mon Sep 17 00:00:00 2001 From: Kye Date: Fri, 24 Nov 2023 12:54:44 -0800 Subject: [PATCH 2/2] prompt name fixes for positive med --- playground/demos/positive_med/positive_med.py | 8 ++++---- swarms/prompts/autobloggen.py | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/playground/demos/positive_med/positive_med.py b/playground/demos/positive_med/positive_med.py index c0652a7d..22411688 100644 --- a/playground/demos/positive_med/positive_med.py +++ b/playground/demos/positive_med/positive_med.py @@ -24,9 +24,9 @@ from termcolor import colored from swarms.models import OpenAIChat from swarms.prompts.autobloggen import ( DRAFT_AGENT_SYSTEM_PROMPT, - REVIEW_PROMPT, + AUTOBLOG_REVIEW_PROMPT, SOCIAL_MEDIA_SYSTEM_PROMPT_AGENT, - TOPIC_GENERATOR, + TOPIC_GENERATOR_SYSTEM_PROMPT, ) import os @@ -35,7 +35,7 @@ llm = OpenAIChat(openai_api_key=api_key) def get_review_prompt(article): - prompt = REVIEW_PROMPT.replace("{{ARTICLE}}", article) + prompt = AUTOBLOG_REVIEW_PROMPT.replace("{{ARTICLE}}", article) return prompt @@ -51,7 +51,7 @@ topic_selection_task = ( "Generate 10 topics on gaining mental clarity using ancient practices" ) topics = llm( - f"Your System Instructions: {TOPIC_GENERATOR}, Your current task:" + f"Your System Instructions: {TOPIC_GENERATOR_SYSTEM_PROMPT}, Your current task:" f" {topic_selection_task}" ) diff --git a/swarms/prompts/autobloggen.py b/swarms/prompts/autobloggen.py index 64001d1d..3cad09b2 100644 --- a/swarms/prompts/autobloggen.py +++ b/swarms/prompts/autobloggen.py @@ -1,4 +1,4 @@ -AUTOBLOG_GEN_GENERATOR = """ +TOPIC_GENERATOR_SYSTEM_PROMPT = """ First search for a list of topics on the web based their relevance to Positive Med's long term vision then rank than based on the goals this month, then output a single headline title for a blog for the next autonomous agent to write the blog, utilize the SOP below to help you strategically select topics. Output a single topic that will be the foundation for a blog. @@ -274,3 +274,5 @@ Check Accuracy: - Flag any bold claims that lack credible evidence for fact-checker review. """ + +