Merge branch 'kyegomez:master' into master

pull/184/head
pliny 1 year ago committed by GitHub
commit 7f4cac2132
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -15,17 +15,18 @@ Distribution Agent:
- Social Media posts for the article. - Social Media posts for the article.
# TODO # TODO
- Make prompts better
- Add shorter and better topic generator prompt - Add shorter and better topic generator prompt
- Optimize writer prompt to create longer and more enjoyeable blogs - Optimize writer prompt to create longer and more enjoyeable blogs
- Use Local Models like Storywriter - Use Local Models like Storywriter
""" """
from termcolor import colored from termcolor import colored
from swarms.models import OpenAIChat from swarms.models import OpenAIChat
from swarms.prompts.autobloggen from swarms.prompts.autobloggen import (
DRAFT_AGENT_SYSTEM_PROMPT, DRAFT_AGENT_SYSTEM_PROMPT,
REVIEW_PROMPT, AUTOBLOG_REVIEW_PROMPT,
SOCIAL_MEDIA_SYSTEM_PROMPT_AGENT, SOCIAL_MEDIA_SYSTEM_PROMPT_AGENT,
TOPIC_GENERATOR, TOPIC_GENERATOR_SYSTEM_PROMPT,
) )
import os import os
@ -34,7 +35,7 @@ llm = OpenAIChat(openai_api_key=api_key)
def get_review_prompt(article): def get_review_prompt(article):
prompt = REVIEW_PROMPT.replace("{{ARTICLE}}", article) prompt = AUTOBLOG_REVIEW_PROMPT.replace("{{ARTICLE}}", article)
return prompt return prompt
@ -50,7 +51,7 @@ topic_selection_task = (
"Generate 10 topics on gaining mental clarity using ancient practices" "Generate 10 topics on gaining mental clarity using ancient practices"
) )
topics = llm( 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}" f" {topic_selection_task}"
) )

@ -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. 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. - Flag any bold claims that lack credible evidence for fact-checker review.
""" """

Loading…
Cancel
Save