File size: 2,357 Bytes
9a6af66
7932bb1
186c315
9a6af66
5a067ab
c8fab27
 
5a067ab
 
 
 
 
c8fab27
 
5a067ab
 
7d3d2eb
5a067ab
9a6af66
 
 
2ca386f
5a067ab
 
 
06c8bab
9a6af66
 
 
 
 
 
 
8e054a4
9a6af66
 
 
 
 
 
 
8e054a4
9a6af66
8e054a4
 
 
 
 
 
 
9a6af66
 
 
 
8e054a4
9a6af66
 
 
8e054a4
9a6af66
b85afa8
 
 
a0e8e60
 
b85afa8
538af23
c7acab6
538af23
b85afa8
 
a0e8e60
f452678
a0e8e60
 
 
46d06fa
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
from pydantic import BaseModel, Field
from typing import List, Optional, Any, Dict


class Experience(BaseModel):
    start: Optional[str] = Field(None, description="Start date in ISO String YYYY-MM-DDTHH:mm:ss.sssZ format")
    end: Optional[str] = Field(None, description="End date in ISO String YYYY-MM-DDTHH:mm:ss.sssZ format")
    designation: str = Field(...)
    company: str = Field(...)
    experience_description: str = Field(...)

class Education(BaseModel):
    start: Optional[str] = Field(None, description="Start date in ISO String YYYY-MM-DDTHH:mm:ss.sssZ format")
    end: Optional[str] = Field(None, description="End date in ISO String YYYY-MM-DDTHH:mm:ss.sssZ format")
    major: str = Field(...)
    campus: str = Field(...)
    gpa: int = Field(None, description="Get the two most significant digit then times by 100, for example 3.41 become 341")

class CVExtracted(BaseModel):
    name: str = Field(...)
    skills: List[str] = Field(...)
    links: List[str] = Field(...)
    achievements: List[str] = Field(...)
    experiences: List[Experience] = Field(...)
    educations: List[Education] = Field(...)

class InsertedText(BaseModel):
    text: str

class CVToClassify(BaseModel):
    educations: List[dict[str, Any]]
    skills: List[str]
    experiences: List[dict[str, Any]]
    location: str

class JobToClassify(BaseModel):
    minYoE: int
    jobDesc: str
    skills: List[str]
    role: str
    majors: List[str]
    location: str

class Weight(BaseModel):
    exp: float
    position: float
    major: float
    skills: float
    diffYoe: float
    location: float

class JobAndCV(BaseModel):
    cv: CVToClassify
    job: JobToClassify
    weight: Weight

class ClassificationResult(BaseModel):
    score: float

class InsertedLink(BaseModel):
    link: str

class Evaluation(BaseModel):
    score: float = Field(None, description="Float range between [0,1]")
    judgement: str = Field(None, description="Give judgement about the score of the interview evaluation.")

class Evaluations(BaseModel):
    value: list[Evaluation] = Field(...)

class EvaModul(BaseModel):
    competences: list[str]
    transcript: list[list[Dict[str,str]]]
    lang: str = Field(...)

class EvalResult(BaseModel):
    final_score: float
    details: list[Evaluation]