-
Notifications
You must be signed in to change notification settings - Fork 52
/
main.py
52 lines (41 loc) · 1.89 KB
/
main.py
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
"""
-----------------------------------------------------------------------
File: main.py
Creation Time: Nov 24th 2023 7:04 pm
Author: Saurabh Zinjad
Developer Email: [email protected]
Copyright (c) 2023 Saurabh Zinjad. All rights reserved | GitHub: Ztrimus
-----------------------------------------------------------------------
"""
import argparse
from zlm import AutoApplyModel
def create_resume_cv(url, master_data, api_key, provider, model, downloads_dir):
"""
Creates a resume or CV using the Job-LLM model.
Args:
url (str): The URL of the job posting or description.
master_data (dict): The master data containing information about the candidate.
api_key (str): The API key for OpenAI.
provider (str): The LLM provider to use. Currently, only "OpenAI, Gemini" is supported.
model (str): The LLM model to use.
downloads_dir (str): The directory where the generated resume or CV will be saved.
Returns:
None
"""
job_llm = AutoApplyModel(api_key, provider, model, downloads_dir)
job_llm.resume_cv_pipeline(url, master_data)
if __name__ == "__main__":
# Create an argument parser
parser = argparse.ArgumentParser()
# Add the required arguments
parser.add_argument("-u", "--url", help="URL of the job posting")
parser.add_argument("-m", "--master_data", help="Path of user's master data file.")
parser.add_argument("-k", "--api_key", default="os", help="LLM Provider API Keys")
parser.add_argument("-d", "--downloads_dir", help="Give detailed path of folder")
parser.add_argument("-p", "--provider", help="LLM provider name. support for openai, gemini")
parser.add_argument("-l", "--model", help="LLM model name")
# Parse the arguments
args = parser.parse_args()
create_resume_cv(
args.url, args.master_data, args.api_key, args.provider, args.model, args.downloads_dir
)