''' This module generates top accomplishment from resume ''' from loaders import get_chain_for_pdf def generate_query(title:str, company:str, job_description: str): ''' Generate a query from a title and company ''' query = f""" What are the top accomplishments from the candidate resume relevant to the job given below? \ The job is {title} at {company}. \ The job description is: \n {job_description} \n Return the top accomplishments as bullet points sorted by relevance to the job description. Do not include points that are NOT in the resume. \ """ return query def get_accomplishments(title:str, company:str, job_description: str, resume_path = "resume.pdf"): ''' Generate a cover letter from a title and company ''' query = generate_query(title, company, job_description) chain = get_chain_for_pdf(resume_path) response = chain({"query": query}) return response['result']