remove " from cta
This commit is contained in:
+4
-3
@@ -36,6 +36,7 @@ def get_viral_share_prompt(article_title, content):
|
||||
"Make it bold, quirky, and engaging with a Buzzfeed/Upworthy flair (e.g., 'Obsessed? Share Now'). "
|
||||
"Avoid clichés like 'game-changer' and words like 'elevate'. "
|
||||
"Do not include emojis, the platform name (e.g., Twitter, Facebook), or any HTML. "
|
||||
"Do not wrap the prompt in quotation marks. "
|
||||
"Return only the prompt text."
|
||||
)
|
||||
response = client.chat.completions.create(
|
||||
@@ -45,9 +46,11 @@ def get_viral_share_prompt(article_title, content):
|
||||
{"role": "user", "content": f"Title: {article_title}\nContent: {content}"}
|
||||
],
|
||||
max_tokens=20,
|
||||
temperature=0.9 # Higher temperature for more creativity
|
||||
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:
|
||||
@@ -56,10 +59,8 @@ def get_viral_share_prompt(article_title, content):
|
||||
|
||||
def select_best_cta(title, content, post_url=None):
|
||||
cta_templates = [
|
||||
# Like-focused CTAs
|
||||
"Love This Foodie Find Hit That Like Button",
|
||||
"Think This Dish Is a Game Changer Show Some Love With a Like",
|
||||
# Follow-focused CTAs
|
||||
"Hungry for More Foodie Insights Follow Us for the Latest Trends",
|
||||
"Dont Miss Out on Foodie Updates Follow Us Today"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user