File size: 5,382 Bytes
bc49c7c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
df2dfd8
bc49c7c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
025b987
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
import os
import openai


# Define the API key for the OpenAI model
openai.api_key = os.environ["OPENAI"]

# "text-davinci-003": "text-davinci-003 can do any language task with better quality, longer output, and consistent instruction-following than the curie, babbage, or ada models. Also supports inserting completions within text.",
# "text-curie-001": "text-curie-001 is very capable, faster and lower cost than Davinci.",
# "text-babbage-001": "text-babbage-001 is capable of straightforward tasks, very fast, and lower cost.",
# "text-ada-001": "text-ada-001 is capable of very simple tasks, usually the fastest model in the GPT-3 series, and lowest cost.",
# "gpt-4": "More capable than any GPT-3.5 model, able to do more complex tasks, and optimized for chat. Will be updated with our latest model iteration.",
# "gpt-3.5-turbo": "Most capable GPT-3.5 model and optimized for chat at 1/10th the cost of text-davinci-003. Will be updated with our latest model iteration",
MODEL = "gpt-3.5-turbo"
LANGUAGE = "en"  # nl / en


def call_openai(model, prompt):
    response = openai.ChatCompletion.create(
        model=model,
        messages=[
            # {
            #     "role": "system",
            #     "content": "You are a helpful assistant."
            # },
            {"role": "user", "content": prompt},
            # {
            #     "role": "assistant",
            #     "content": "Alright, let me summarize that for you."
            # }
        ],
    )

    result = response["choices"][0]["message"]["content"]
    print("Got a language_response!")
    return result

vacancy = """
DATA SCIENTIST - GENTIS
========================

Profile:

Min of 3 years experience as a Data Scientist
Experience in Python and SQL
Communicative very strong
Experience in coaching and supporting junior collegues
Experience in Google Cloud is a plus
Experience in Machine Learning is a plus

They offer:

An opportunity to be part of not only a fast-growing, innovative company, but one where you as a person can grow professionally as fast as the company
A close-knit and diverse team who are all ready to help, listen and give advice to each other
Training opportunities (because they don't stand still, so neither do you)
Trendy and young company where everyone can be their own
A very nice salary package and much more
Lots of remote work and flexibility, so bye bye traffic JAMS!
A renovated office with everything you could dream of full with surprises and extras

"""

resume = """
John Doe
=============================

Skills 
 -  Python 
 -  Tableau 
 -  Data Visualization 
 -  R Studio 
 -  Machine Learning 
 -  Statistics IABAC Certified Data Scientist with versatile experience over 1+ years in managing business, data science consulting and leading innovation projects, bringing business ideas to working real world solutions.
Being a strong advocator of augmented era, where human capabilities are enhanced by machines, Fahed is passionate about bringing business concepts in area of machine learning, AI, robotics etc., to real life solutions.Education Details  January 2017 B.
Tech Computer Science & Engineering Mohali, Punjab Indo Global College of Engineering Data Science Consultant   Data Science Consultant - Datamites Skill Details  MACHINE LEARNING- Exprience - 13 months PYTHON- Exprience - 24 months SOLUTIONS- Exprience - 24 months DATA SCIENCE- Exprience - 24 months DATA VISUALIZATION- Exprience - 24 months Tableau- Exprience - 24 monthsCompany Details  company - Datamites description - 
 -  Analyzed and processed complex data sets using advanced querying, visualization and analytics tools.

 -  Responsible for loading, extracting and validation of client data.

 -  Worked on manipulating, cleaning & processing data using python.

 -  Used Tableau for data visualization.
company - Heretic Solutions Pvt Ltd description - 
 -  Worked closely with business to identify issues and used data to propose solutions for effective decision making.

 -  Manipulating, cleansing & processing data using Python, Excel and R.

 -  Analyzed raw data, drawing conclusions & developing recommendations.

 -  Used machine learning tools and statistical techniques to produce solutions to problems.

"""


def create(vacancy=vacancy, resume=resume):
    cover_letter = f"""
    You are a recruitment specialist that tries to place the right profiles for the right job.
    I have a vacancy below the delimiter <VACANCY:> and I have a candidate its resume below the delimiter <RESUME:>.

    <VACANCY:>

    {vacancy}

    <RESUME:>

    Can you fill in the introduction email below the delimiter <INTRO:> and only return as answer this introduction email?

    {resume}

    <INTRO:>

    Role: < the role of the vacancy >
    Candidate: < name of the candidate >
    Education: < name the education of the candidate >
    Responsibilities: < did the candidate worked as an individual contributor or did het take on leadership postitions? >
    Experience: < name 2 most relevant experiences from the candidate for this vacancy in a short compact sentence. Add these as a bullet list >
    Skills: < name the most relevant skills from the resume for this vacancy. No other skill should be mentioned. Add these as a bullet list >

    """
    response = call_openai(model=MODEL, prompt=cover_letter)
    print(response)
    return response