Spaces:
Sleeping
Sleeping
feat: integrate ever-jobs for 170 job platforms, content fingerprint dedup, grouped UI selector
b617fcc | import os | |
| from dotenv import load_dotenv | |
| load_dotenv() | |
| NVIDIA_BASE_URL = "https://integrate.api.nvidia.com/v1" | |
| # Primary key β GLM 5.1 (most reliable, used for resume parsing + customization) | |
| NVIDIA_API_KEY = os.getenv("NVIDIA_API_KEY") | |
| GLM_BASE_URL = NVIDIA_BASE_URL | |
| GLM_MODEL = "z-ai/glm-5.1" | |
| # ββ 10 assessment models ββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| # phase1 = used for quick keyword scoring (instant, no LLM needed now) | |
| # phase2 = used for detailed LLM assessment of top jobs | |
| ASSESSMENT_MODELS = [ | |
| # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| # Phase 2 (detailed LLM assessment) speed results from test run: | |
| # Kimi-K2.6 ~5s/batch FAST β phase2=True | |
| # Step-3.7-Flash ~8-35s FAST β phase2=True | |
| # Qwen3.5-397b ~9s FAST β phase2=True | |
| # Qwen3.5-122b-v2 ~12s FAST β phase2=True | |
| # GPT-OSS-120b ~11s FAST β phase2=True | |
| # Qwen3.5-122b ~40s OK β phase2=True | |
| # DeepSeek-v4-Pro ~42s OK β phase2=True | |
| # DeepSeek-v4-Flash ~229s SLOW β οΈ phase2=False (too slow) | |
| # GLM-5.1 ~234s SLOW β οΈ phase2=False (too slow) | |
| # MiniMax-M2.7 ~908s BLOCKEDβ phase2=False | |
| # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| { | |
| "name": "Kimi-K2.6", | |
| "model": "moonshotai/kimi-k2.6", | |
| "api_key": os.getenv("NVIDIA_API_KEY_3"), | |
| "base_url": NVIDIA_BASE_URL, | |
| "extra_body": {}, | |
| "phase1": True, | |
| "phase2": True, # ~5s per batch FAST | |
| }, | |
| { | |
| "name": "Step-3.7-Flash", | |
| "model": "stepfun-ai/step-3.7-flash", | |
| "api_key": os.getenv("NVIDIA_API_KEY_8"), | |
| "base_url": NVIDIA_BASE_URL, | |
| "extra_body": {}, | |
| "phase1": True, | |
| "phase2": True, # ~8-35s FAST | |
| }, | |
| { | |
| "name": "Qwen3.5-397b", | |
| "model": "qwen/qwen3.5-397b-a17b", | |
| "api_key": os.getenv("NVIDIA_API_KEY_7"), | |
| "base_url": NVIDIA_BASE_URL, | |
| "extra_body": {}, | |
| "phase1": True, | |
| "phase2": True, # ~9s FAST | |
| }, | |
| { | |
| "name": "Qwen3.5-122b-v2", | |
| "model": "qwen/qwen3.5-122b-a10b", | |
| "api_key": os.getenv("NVIDIA_API_KEY_7"), | |
| "base_url": NVIDIA_BASE_URL, | |
| "extra_body": {}, | |
| "phase1": True, | |
| "phase2": True, # ~12s FAST | |
| }, | |
| { | |
| "name": "GPT-OSS-120b", | |
| "model": "openai/gpt-oss-120b", | |
| "api_key": os.getenv("NVIDIA_API_KEY_5"), | |
| "base_url": NVIDIA_BASE_URL, | |
| "extra_body": {}, | |
| "phase1": True, | |
| "phase2": True, # ~11s FAST | |
| }, | |
| { | |
| "name": "Qwen3.5-122b", | |
| "model": "qwen/qwen3.5-122b-a10b", | |
| "api_key": os.getenv("NVIDIA_API_KEY_4"), | |
| "base_url": NVIDIA_BASE_URL, | |
| "extra_body": {}, | |
| "phase1": True, | |
| "phase2": True, # ~40s OK | |
| }, | |
| { | |
| "name": "DeepSeek-v4-Pro", | |
| "model": "deepseek-ai/deepseek-v4-pro", | |
| "api_key": os.getenv("NVIDIA_API_KEY_2"), | |
| "base_url": NVIDIA_BASE_URL, | |
| "extra_body": {"chat_template_kwargs": {"thinking": False}}, | |
| "phase1": True, | |
| "phase2": True, # ~42s OK | |
| }, | |
| { | |
| "name": "DeepSeek-v4-Flash", | |
| "model": "deepseek-ai/deepseek-v4-flash", | |
| "api_key": os.getenv("NVIDIA_API_KEY_6"), | |
| "base_url": NVIDIA_BASE_URL, | |
| "extra_body": {"chat_template_kwargs": {"thinking": True, "reasoning_effort": "high"}}, | |
| "phase1": True, | |
| "phase2": False, # ~229s too slow for phase2 | |
| }, | |
| { | |
| "name": "GLM-5.1", | |
| "model": "z-ai/glm-5.1", | |
| "api_key": os.getenv("NVIDIA_API_KEY"), | |
| "base_url": NVIDIA_BASE_URL, | |
| "extra_body": {}, | |
| "phase1": True, | |
| "phase2": False, # ~234s too slow for phase2; used for resume customization | |
| }, | |
| { | |
| "name": "MiniMax-M2.7", | |
| "model": "minimaxai/minimax-m2.7", | |
| "api_key": os.getenv("NVIDIA_API_KEY_2"), | |
| "base_url": NVIDIA_BASE_URL, | |
| "extra_body": {}, | |
| "phase1": True, | |
| "phase2": False, # ~908s BLOCKED | |
| }, | |
| ] | |
| # ββ Google Sheets / Drive ββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| GOOGLE = { | |
| "sheet_id": os.getenv("GOOGLE_SHEET_ID", "1Ehxt3eortehbtySdtgcSrMhCqmxIMUAmvRqSkII0HJk"), | |
| "sheet_tab": "Job Applications", | |
| "drive_folder": "Job Automation Agent β Resumes", | |
| "credentials_file": "google_credentials.json", # Service account JSON | |
| "token_file": "google_token.json", # OAuth token (auto-created) | |
| } | |
| # ββ Job Search β Product Manager roles ONLY βββββββββββββββββββββββββββββββ | |
| JOB_SEARCH = { | |
| "roles": [ | |
| "Product Manager", | |
| "Senior Product Manager", | |
| "AI Product Manager", | |
| "Technical Product Manager", | |
| "Product Owner", | |
| ], | |
| # Required words in job title β scraper DROPS any job without these | |
| "required_title_words": ["product"], | |
| # Blocked words in title β scraper DROPS any job with these | |
| "blocked_title_words": [ | |
| "teacher", "faculty", "engineer", "developer", "designer", | |
| "accountant", "analyst", "consultant", "manager data", | |
| "project manager", "program manager", "marketing manager", | |
| "sales", "hr ", "recruiter", "finance", "legal", | |
| "civil", "mechanical", "electrical", "hardware", "network", | |
| "software engineer", "data engineer", "ml engineer", | |
| ], | |
| "locations": ["India", "Bangalore", "Mumbai", "Delhi NCR", "Hyderabad", "Pune", "Remote"], | |
| "experience_min": 2, | |
| "experience_max": 15, | |
| "max_jobs_per_platform": 30, | |
| "days_posted": 7, | |
| "primary_role": "Product Manager", | |
| } | |
| # Platforms (Naukri blocked by Akamai) | |
| PLATFORMS = { | |
| "linkedin": True, | |
| "naukri": False, | |
| "indeed": True, | |
| "glassdoor": True, | |
| } | |
| # Assessment β process ALL PM jobs | |
| ASSESSMENT = { | |
| "min_score_for_llm_resume": 6, # LLM-tailored resume for score >= this | |
| "generate_all_resumes": True, # Template resume for ALL PM-relevant jobs | |
| "max_llm_resumes": 30, # Max LLM-tailored resumes per run | |
| "process_all_jobs": True, # Assess ALL scraped jobs (not just top N) | |
| "dedup_days": 30, # Skip jobs seen in last N days (0 = no dedup) | |
| "test_mode": False, # Set True for quick test run | |
| "test_jobs_limit": 10, # Max jobs in test mode | |
| } | |
| # ββ ever-jobs integration βββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| from src.ever_jobs_bridge.platforms import INDIA_DEFAULT_PLATFORMS | |
| EVER_JOBS = { | |
| "api_url": "http://localhost:3001", | |
| "default_platforms": INDIA_DEFAULT_PLATFORMS, | |
| "max_results": 25, | |
| "request_timeout": 30, | |
| "http_timeout": 120, | |
| "max_platforms_per_call": 20, | |
| } | |
| # Output | |
| OUTPUT = { | |
| "excel_path": "data/output/reports/job_report.xlsx", | |
| "resumes_dir": "data/output/resumes/", | |
| "report_dir": "data/output/reports/", | |
| } | |
| # Resume | |
| RESUME = { | |
| "pdf_path": os.getenv("RESUME_PATH", "data/resume/resume.pdf"), | |
| } | |