Update chains.py
Browse files
chains.py
CHANGED
|
@@ -32,22 +32,20 @@ class Chain:
|
|
| 32 |
raise OutputParserException("Context too big. Unable to parse jobs.")
|
| 33 |
return res if isinstance(res, list) else [res]
|
| 34 |
|
| 35 |
-
def write_mail(self, job, links):
|
| 36 |
prompt_email = PromptTemplate.from_template(
|
| 37 |
"""
|
| 38 |
### JOB DESCRIPTION:
|
| 39 |
-
{job_description}
|
| 40 |
-
|
| 41 |
### INSTRUCTION:
|
| 42 |
-
You are
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
Do not provide a preamble.
|
| 49 |
### EMAIL (NO PREAMBLE):
|
| 50 |
-
|
| 51 |
"""
|
| 52 |
)
|
| 53 |
chain_email = prompt_email | self.llm
|
|
@@ -55,4 +53,4 @@ class Chain:
|
|
| 55 |
return res.content
|
| 56 |
|
| 57 |
if __name__ == "__main__":
|
| 58 |
-
print(os.getenv("GROQ_API_KEY"))
|
|
|
|
| 32 |
raise OutputParserException("Context too big. Unable to parse jobs.")
|
| 33 |
return res if isinstance(res, list) else [res]
|
| 34 |
|
| 35 |
+
def write_mail(self, job, links, username="Computer Engineering Student", client_name="Hiring Manager"):
|
| 36 |
prompt_email = PromptTemplate.from_template(
|
| 37 |
"""
|
| 38 |
### JOB DESCRIPTION:
|
| 39 |
+
{{job_description}}
|
| 40 |
+
|
| 41 |
### INSTRUCTION:
|
| 42 |
+
You are {username}, a dedicated third-year Computer Engineering student.
|
| 43 |
+
You actively engage in projects that enhance your technical skills and have good communication skills.
|
| 44 |
+
Your task is to write a cold email to {client_name} regarding the job mentioned above, showcasing your capabilities and how your academic pursuits align with their needs.
|
| 45 |
+
Highlight your interests in innovative solutions and user engagement, as well as your commitment to creating impactful projects.
|
| 46 |
+
Also, add the most relevant ones from the following links to showcase your portfolio: {{link_list}}
|
| 47 |
+
Maintain a professional tone and avoid providing a preamble.
|
|
|
|
| 48 |
### EMAIL (NO PREAMBLE):
|
|
|
|
| 49 |
"""
|
| 50 |
)
|
| 51 |
chain_email = prompt_email | self.llm
|
|
|
|
| 53 |
return res.content
|
| 54 |
|
| 55 |
if __name__ == "__main__":
|
| 56 |
+
print(os.getenv("GROQ_API_KEY"))
|