fixed names and llm problems
This commit is contained in:
parent
b554357be9
commit
3f13d9bf1a
4 changed files with 25 additions and 20 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'
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ class AIAdapter:
|
|||
elif llm_model_type == "ollama":
|
||||
return OllamaModel(api_key, llm_model, llm_api_url)
|
||||
else:
|
||||
raise ValueError(f"Unsupported model type: {model_type}")
|
||||
raise ValueError(f"Unsupported model type: {llm_model_type}")
|
||||
|
||||
def invoke(self, prompt: str) -> str:
|
||||
return self.model.invoke(prompt)
|
||||
|
|
@ -204,7 +204,7 @@ class LoggerChatModel:
|
|||
while True:
|
||||
try:
|
||||
logger.debug("Attempting to call the LLM with messages")
|
||||
reply = self.llm(messages)
|
||||
reply = self.llm.invoke(messages)
|
||||
logger.debug("LLM response received: %s", reply)
|
||||
|
||||
parsed_reply = self.parse_llmresult(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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue