my-fix-branch
Shane 7 months ago
parent b025afe9f3
commit aabc989e1c
  1. 14
      foodie_hooks.py

@ -49,21 +49,9 @@ def get_viral_share_prompt(article_title, content):
temperature=0.9
)
share_prompt = response.choices[0].message.content.strip()
# Remove any leading or trailing quotation marks
share_prompt = share_prompt.strip('"\'')
logging.info(f"Generated viral share prompt: {share_prompt}")
return share_prompt
except Exception as e:
logging.error(f"Viral share prompt generation failed: {e}")
return "Love This? Share It"
def select_best_cta(title, content, post_url=None):
cta_templates = [
"Love This Foodie Find Hit That Like Button",
"Think This Dish Is a Game Changer Show Some Love With a Like",
"Hungry for More Foodie Insights Follow Us for the Latest Trends",
"Dont Miss Out on Foodie Updates Follow Us Today"
]
cta = random.choice(cta_templates)
return cta
return "Love This? Share It"
Loading…
Cancel
Save