siddhartharya
commited on
Commit
•
984b0e1
1
Parent(s):
cc8da7b
Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ class AutonomousEmailAgent:
|
|
18 |
self.experiences = []
|
19 |
self.company_info = None
|
20 |
self.role_description = None
|
21 |
-
self.attempts = 0
|
22 |
|
23 |
def fetch_linkedin_data(self):
|
24 |
proxycurl_api_key = os.getenv("PROXYCURL_API_KEY")
|
@@ -59,7 +59,7 @@ class AutonomousEmailAgent:
|
|
59 |
You are an AI agent tasked with generating a job application email using Simon Sinek's Start with Why model.
|
60 |
The email must begin with why the candidate is passionate about the role, then explain how their skills and
|
61 |
experience align with the company and role, and finally describe specific achievements that demonstrate their
|
62 |
-
capabilities.
|
63 |
|
64 |
Here’s the current data:
|
65 |
- LinkedIn profile: {self.linkedin_url}
|
@@ -69,7 +69,7 @@ class AutonomousEmailAgent:
|
|
69 |
- Candidate's Skills: {', '.join(self.skills)}
|
70 |
- Candidate's Experiences: {', '.join([exp['title'] for exp in self.experiences])}
|
71 |
|
72 |
-
Generate
|
73 |
"""
|
74 |
|
75 |
return self.send_request_to_llm(reasoning_prompt)
|
@@ -116,14 +116,6 @@ class AutonomousEmailAgent:
|
|
116 |
paragraphs = [line.strip() for line in llm_response.split("\n") if line.strip()]
|
117 |
formatted_email = "\n\n".join(paragraphs)
|
118 |
|
119 |
-
# Ensure the email stays within the word limit and retains logical coherence
|
120 |
-
words = formatted_email.split()
|
121 |
-
if len(words) > self.word_limit:
|
122 |
-
truncated_email = " ".join(words[:self.word_limit])
|
123 |
-
if not truncated_email.endswith((".", "!", "?")):
|
124 |
-
truncated_email += "..."
|
125 |
-
formatted_email = truncated_email
|
126 |
-
|
127 |
# Add the closing section with a call to action
|
128 |
closing_section = (
|
129 |
"\n\nI would appreciate the opportunity to discuss how my background, skills, and passion align with the goals "
|
|
|
18 |
self.experiences = []
|
19 |
self.company_info = None
|
20 |
self.role_description = None
|
21 |
+
self.attempts = 0
|
22 |
|
23 |
def fetch_linkedin_data(self):
|
24 |
proxycurl_api_key = os.getenv("PROXYCURL_API_KEY")
|
|
|
59 |
You are an AI agent tasked with generating a job application email using Simon Sinek's Start with Why model.
|
60 |
The email must begin with why the candidate is passionate about the role, then explain how their skills and
|
61 |
experience align with the company and role, and finally describe specific achievements that demonstrate their
|
62 |
+
capabilities. The email must not exceed {self.word_limit} words but should remain coherent and complete.
|
63 |
|
64 |
Here’s the current data:
|
65 |
- LinkedIn profile: {self.linkedin_url}
|
|
|
69 |
- Candidate's Skills: {', '.join(self.skills)}
|
70 |
- Candidate's Experiences: {', '.join([exp['title'] for exp in self.experiences])}
|
71 |
|
72 |
+
Generate a fully coherent and complete email that fits within the word limit.
|
73 |
"""
|
74 |
|
75 |
return self.send_request_to_llm(reasoning_prompt)
|
|
|
116 |
paragraphs = [line.strip() for line in llm_response.split("\n") if line.strip()]
|
117 |
formatted_email = "\n\n".join(paragraphs)
|
118 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
# Add the closing section with a call to action
|
120 |
closing_section = (
|
121 |
"\n\nI would appreciate the opportunity to discuss how my background, skills, and passion align with the goals "
|