Merge branch 'v3' into v3
This commit is contained in:
commit
bed7c5e173
6 changed files with 34 additions and 22 deletions
|
|
@ -1,6 +1,6 @@
|
|||
remote: [true/false]
|
||||
|
||||
experienceLevel:
|
||||
experience_level:
|
||||
internship: [true/false]
|
||||
entry: [true/false]
|
||||
associate: [true/false]
|
||||
|
|
@ -31,7 +31,7 @@ locations:
|
|||
- Country1
|
||||
- Country2
|
||||
|
||||
applyOnceAtCompany: [true/false]
|
||||
apply_once_at_company: [true/false]
|
||||
|
||||
distance: 100
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ company_blacklist:
|
|||
- Company1
|
||||
- Company2
|
||||
|
||||
titleBlacklist:
|
||||
title_blacklist:
|
||||
- word1
|
||||
- word2
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
remote: true
|
||||
|
||||
experienceLevel:
|
||||
experience_level:
|
||||
internship: true
|
||||
entry: true
|
||||
associate: true
|
||||
|
|
@ -29,15 +29,21 @@ positions:
|
|||
locations:
|
||||
- USA
|
||||
|
||||
applyOnceAtCompany: [true/false]
|
||||
apply_once_at_company: [true/false]
|
||||
|
||||
distance: 100
|
||||
|
||||
companyBlacklist:
|
||||
company_blacklist:
|
||||
- Noir
|
||||
- Crossover
|
||||
|
||||
titleBlacklist:
|
||||
title_blacklist:
|
||||
- word1
|
||||
- word2
|
||||
|
||||
job_applicants_threshold:
|
||||
min_applicants: 0
|
||||
max_applicants: 100
|
||||
|
||||
llm_model_type: openai
|
||||
llm_model: 'gpt-4o'
|
||||
|
|
|
|||
|
|
@ -14,4 +14,11 @@ click
|
|||
git+https://github.com/feder-cr/lib_resume_builder_AIHawk.git
|
||||
linkedin-api
|
||||
pdfminer.six==20221105
|
||||
inputimeout
|
||||
inputimeout==1.0.4
|
||||
langchain-ollama==0.1.3
|
||||
langchain-anthropic==0.1.3
|
||||
jsonschema==4.23.0
|
||||
jsonschema-specifications==2023.12.1
|
||||
httpx~=0.27.2
|
||||
python-dotenv~=1.0.1
|
||||
PyYAML~=6.0.2
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ class LoggerChatModel:
|
|||
while True:
|
||||
try:
|
||||
logger.debug("Attempting to call the LLM with messages")
|
||||
# Ensure you're using invoke to call the model
|
||||
|
||||
reply = self.llm.invoke(messages)
|
||||
logger.debug("LLM response received: %s", reply)
|
||||
|
||||
|
|
|
|||
|
|
@ -47,10 +47,10 @@ class LinkedInJobManager:
|
|||
def set_parameters(self, parameters):
|
||||
logger.debug("Setting parameters for LinkedInJobManager")
|
||||
self.company_blacklist = parameters.get('company_blacklist', []) or []
|
||||
self.title_blacklist = parameters.get('titleBlacklist', []) or []
|
||||
self.title_blacklist = parameters.get('title_blacklist', []) or []
|
||||
self.positions = parameters.get('positions', [])
|
||||
self.locations = parameters.get('locations', [])
|
||||
self.apply_once_at_company = parameters.get('applyOnceAtCompany', False)
|
||||
self.apply_once_at_company = parameters.get('apply_once_at_company', False)
|
||||
self.base_search_url = self.get_base_search_url(parameters)
|
||||
self.seen_jobs = []
|
||||
|
||||
|
|
@ -120,8 +120,8 @@ class LinkedInJobManager:
|
|||
if time_left > 0:
|
||||
try:
|
||||
user_input = inputimeout(
|
||||
prompt=f"Sleeping for {time_left} seconds. Press 'y' to skip waiting. Timeout 10 seconds : ",
|
||||
timeout=10).strip().lower()
|
||||
prompt=f"Sleeping for {time_left} seconds. Press 'y' to skip waiting. Timeout 60 seconds : ",
|
||||
timeout=60).strip().lower()
|
||||
except TimeoutOccurred:
|
||||
user_input = '' # No input after timeout
|
||||
if user_input == 'y':
|
||||
|
|
@ -138,8 +138,8 @@ class LinkedInJobManager:
|
|||
sleep_time = random.randint(5, 34)
|
||||
try:
|
||||
user_input = inputimeout(
|
||||
prompt=f"Sleeping for {sleep_time / 60} minutes. Press 'y' to skip waiting. Timeout 10 seconds : ",
|
||||
timeout=10).strip().lower()
|
||||
prompt=f"Sleeping for {sleep_time / 60} minutes. Press 'y' to skip waiting. Timeout 60 seconds : ",
|
||||
timeout=60).strip().lower()
|
||||
except TimeoutOccurred:
|
||||
user_input = '' # No input after timeout
|
||||
if user_input == 'y':
|
||||
|
|
@ -160,8 +160,8 @@ class LinkedInJobManager:
|
|||
if time_left > 0:
|
||||
try:
|
||||
user_input = inputimeout(
|
||||
prompt=f"Sleeping for {time_left} seconds. Press 'y' to skip waiting. Timeout 10 seconds : ",
|
||||
timeout=10).strip().lower()
|
||||
prompt=f"Sleeping for {time_left} seconds. Press 'y' to skip waiting. Timeout 60 seconds : ",
|
||||
timeout=60).strip().lower()
|
||||
except TimeoutOccurred:
|
||||
user_input = '' # No input after timeout
|
||||
if user_input == 'y':
|
||||
|
|
@ -179,7 +179,7 @@ class LinkedInJobManager:
|
|||
try:
|
||||
user_input = inputimeout(
|
||||
prompt=f"Sleeping for {sleep_time / 60} minutes. Press 'y' to skip waiting: ",
|
||||
timeout=10).strip().lower()
|
||||
timeout=60).strip().lower()
|
||||
except TimeoutOccurred:
|
||||
user_input = '' # No input after timeout
|
||||
if user_input == 'y':
|
||||
|
|
@ -370,7 +370,7 @@ class LinkedInJobManager:
|
|||
url_parts = []
|
||||
if parameters['remote']:
|
||||
url_parts.append("f_CF=f_WRA")
|
||||
experience_levels = [str(i + 1) for i, (level, v) in enumerate(parameters.get('experienceLevel', {}).items()) if
|
||||
experience_levels = [str(i + 1) for i, (level, v) in enumerate(parameters.get('experience_level', {}).items()) if
|
||||
v]
|
||||
if experience_levels:
|
||||
url_parts.append(f"f_E={','.join(experience_levels)}")
|
||||
|
|
@ -429,7 +429,6 @@ class LinkedInJobManager:
|
|||
link_seen = link in self.seen_jobs
|
||||
is_blacklisted = title_blacklisted or company_blacklisted or link_seen
|
||||
logger.debug("Job blacklisted status: %s", is_blacklisted)
|
||||
return is_blacklisted
|
||||
|
||||
return title_blacklisted or company_blacklisted or link_seen
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ from selenium import webdriver
|
|||
log_file = "app_log.log"
|
||||
|
||||
logging.basicConfig(
|
||||
level=logging.DEBUG,
|
||||
level=logging.INFO,
|
||||
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
|
||||
handlers=[
|
||||
logging.FileHandler(log_file, mode='a', encoding='utf-8'),
|
||||
|
|
@ -22,7 +22,7 @@ file_handler = logging.FileHandler(log_file, mode='a', encoding='utf-8')
|
|||
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
||||
file_handler.setFormatter(formatter)
|
||||
logger.addHandler(file_handler)
|
||||
logger.setLevel(logging.DEBUG)
|
||||
logger.setLevel(logging.INFO)
|
||||
|
||||
chromeProfilePath = os.path.join(os.getcwd(), "chrome_profile", "linkedin_profile")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue