File size: 1,268 Bytes
7033ce5
f7246b3
 
 
 
 
 
 
 
 
 
7033ce5
f7246b3
 
 
 
7033ce5
f7246b3
7033ce5
f7246b3
7033ce5
f7246b3
 
 
 
 
 
7033ce5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
def build_prompt(user_text, file_text, link_info, mentions, hashtags, custom_prompt, checked_suggestions):
    # Professional Persona
    prompt = "You are an expert LinkedIn Content Strategist and Ghostwriter for top-tier tech executives.\n\n"
    
    # Context Injection
    prompt += f"CONTEXT DATA:\n- User Input: {user_text}\n"
    if file_text:
        prompt += f"- Extracted Info from Document: {file_text}\n"
    
    if link_info and link_info.get('url'):
        prompt += f"- Reference Link: {link_info['url']} ({link_info.get('description', '')})\n"

    # Style Requirements
    prompt += "\nSTYLE GUIDELINES:\n"
    if checked_suggestions:
        prompt += f"- Critical Elements: {', '.join(checked_suggestions)}\n"
    if hashtags:
        prompt += f"- Include these hashtags: {', '.join(hashtags)}\n"
    if custom_prompt:
        prompt += f"- Specific User Instructions: {custom_prompt}\n"

    prompt += "\nOUTPUT FORMAT:\n"
    prompt += "1. Write in a human-like, engaging tone (not robotic).\n"
    prompt += "2. Use 'scroll-stopping' hooks.\n"
    prompt += "3. Ensure professional formatting with appropriate spacing and emojis.\n"
    prompt += "4. Provide 2 variations: one short/punchy, one detailed/story-driven."
    
    return prompt