Spaces:
Sleeping
Sleeping
Update prompts.py
Browse files- prompts.py +14 -15
prompts.py
CHANGED
|
@@ -1,24 +1,23 @@
|
|
| 1 |
from typing import List, Optional
|
| 2 |
|
| 3 |
-
def build_quick_prompt(idea: str,
|
| 4 |
-
tone: str,
|
| 5 |
-
words: int,
|
| 6 |
-
include_emoji: bool,
|
| 7 |
-
add_hashtags: bool,
|
| 8 |
-
language: str) -> str:
|
| 9 |
return (
|
| 10 |
-
"You are a senior LinkedIn content strategist
|
| 11 |
-
"Write
|
|
|
|
| 12 |
f"Language: {language}\n"
|
| 13 |
f"Idea: {idea}\n"
|
| 14 |
f"Tone: {tone}\n"
|
| 15 |
-
f"Target length: ~{words} words\n"
|
| 16 |
-
"
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
"-
|
| 20 |
-
"-
|
| 21 |
-
"-
|
|
|
|
|
|
|
|
|
|
| 22 |
)
|
| 23 |
|
| 24 |
def build_post_prompt(topic: str,
|
|
|
|
| 1 |
from typing import List, Optional
|
| 2 |
|
| 3 |
+
def build_quick_prompt(idea: str, tone: str, words: int, include_emoji: bool, add_hashtags: bool, language: str) -> str:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
return (
|
| 5 |
+
"You are a senior LinkedIn content strategist.\n"
|
| 6 |
+
"Write a concise LinkedIn post as 4–6 short lines (one idea per line). No long paragraphs.\n"
|
| 7 |
+
"Return plain text only (no labels).\n\n"
|
| 8 |
f"Language: {language}\n"
|
| 9 |
f"Idea: {idea}\n"
|
| 10 |
f"Tone: {tone}\n"
|
| 11 |
+
f"Target length: ~{max(90, min(220, words))} words\n"
|
| 12 |
+
"Hard rules (apply silently):\n"
|
| 13 |
+
"- Line 1 must be a bold, specific hook (no generic questions).\n"
|
| 14 |
+
"- Include exactly one concrete detail (metric/date/example).\n"
|
| 15 |
+
f"- Emojis: {'max 1' if include_emoji else 'none'}.\n"
|
| 16 |
+
f"- Hashtags: {'append 1–2 niche hashtags at the very end' if add_hashtags else 'none'}.\n"
|
| 17 |
+
"- Use short sentences and white space for scannability.\n"
|
| 18 |
+
"- End with a question‑led CTA.\n"
|
| 19 |
+
"- No repeated sentences. No clichés. No filler.\n"
|
| 20 |
+
"- Return only the post text."
|
| 21 |
)
|
| 22 |
|
| 23 |
def build_post_prompt(topic: str,
|