添加引导词和投递模板

This commit is contained in:
2026-08-26 16:19:15 +08:00
parent ab79dd89be
commit 8d57c5dbc3
17 changed files with 644 additions and 13 deletions
+4 -2
View File
@@ -177,7 +177,7 @@ class Applicant:
salary_min: int | None, salary_max: int | None,
min_score: int, delay_range: tuple[int, int],
boss_online_only: bool = False, daily_limit: int = 0,
allow_headhunter: bool = False) -> None:
allow_headhunter: bool = False, prompt: str | None = None) -> None:
if self.is_running:
logger.warning("已有投递任务在运行")
return
@@ -185,6 +185,7 @@ class Applicant:
session = self.server.start_session(
keywords=",".join(keywords), city=city,
salary_min=salary_min, salary_max=salary_max,
prompt=prompt,
)
self.session_id = session["id"]
@@ -197,6 +198,7 @@ class Applicant:
self.boss_online_only = boss_online_only
self.daily_limit = daily_limit
self.allow_headhunter = allow_headhunter
self.prompt = prompt
self._daily_base = 0
self._thread = threading.Thread(
@@ -462,7 +464,7 @@ class Applicant:
ai_score, ai_reason = -1, ""
if self.ai and self.ai.available() and self.primary_resume_content:
result = self.ai.score_job(card.jd_text, self.primary_resume_content)
result = self.ai.score_job(card.jd_text, self.primary_resume_content, prompt=self.prompt)
ai_score, ai_reason = result.score, result.reason
logger.info(f"AI 评分 {ai_score}(及格线 {min_score}):"
f"{card.company} - {card.title} | {ai_reason}")