CoolFace
Apppublic

ManinderBajwa/Cold_Emails_with_LLM

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
template_engine.py87 linesDownload Raw Back to root
1class EmailTemplateEngine:2    def __init__(self):3        self.templates = {4            "investor_pitch": """Dear {recipient_name},5 6I hope this email finds you well. I'm {user_name}, {user_title} at {company_name}, and I'm excited to share an investment opportunity with you.7 8{pitch_summary}9 10About {company_name}:11{company_description}12 13We are currently seeking {funding_needs} in funding. Given your role as a {recipient_type} with interests in {typical_interests}, I believe this opportunity aligns well with your investment focus and can address market challenges such as {common_pain_points}.14 15I would love to discuss this further at your convenience. When would be a good time for a call?16 17Best regards,18{user_name}19{user_title} | {company_name}""",20 21            "job_application": """Dear Hiring Manager,22 23I am writing to express my strong interest in the {position} position at your company. As a {user_title} with experience in {relevant_experience}, I believe I would be a great fit for your team.24 25Key Qualifications:26{key_qualifications}27 28Relevant Experience:29{relevant_experience}30 31Education:32{education}33 34Given that I'm applying for a role typically filled by {recipient_type}, I believe my skills align well with your interests in {typical_interests} and can help address common challenges in your industry such as {common_pain_points}.35 36I would welcome the opportunity to discuss how my skills and experience align with your needs. Thank you for your consideration.37 38Best regards,39{user_name}""",40 41            "sales_pitch": """Dear {recipient_name},42 43I hope this email finds you well. I'm {user_name}, {user_title} at {company_name}, and I'm reaching out to discuss how our {product_service_overview} can help your business grow.44 45{unique_selling_proposition}46 47Key Benefits:48{key_benefits}49 50Given your role as a {recipient_type} and your typical interests in {typical_interests}, I believe our solution could address some of your common challenges such as {common_pain_points}.51 52I would love to schedule a call to discuss this further. When would be a good time for you?53 54Best regards,55{user_name}56{user_title} | {company_name}""",57 58            "service_offer": """Dear {recipient_name},59 60I hope this email finds you well. I'm {user_name}, {user_title} at {company_name}, and I'm reaching out to offer our services that can greatly benefit your business.61 62Service Description:63{service_description}64 65Value Proposition:66{value_proposition}67 68Client Benefits:69{client_benefits}70 71As a {recipient_type} with interests in {typical_interests}, I believe our services can help you overcome common challenges such as {common_pain_points}.72 73I would be delighted to schedule a call to discuss how we can work together to achieve your goals. When would be a convenient time for you?74 75Best regards,76{user_name}77{user_title} | {company_name}"""78        }79 80    def get_template(self, template_name):81        return self.templates.get(template_name)82 83    def customize_template(self, template_name, **kwargs):84        template = self.get_template(template_name)85        if not template:86            raise ValueError(f"Template '{template_name}' not found")87        return template.format(**kwargs)