mirror of
https://github.com/vee1e/hiring-agent.git
synced 2026-09-01 18:57:21 +00:00
Minor bug fixes
This commit is contained in:
parent
180fa9cc47
commit
56ecdaceee
3 changed files with 6 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -6,6 +6,7 @@ run/*.pdf
|
|||
test_*.py
|
||||
cache/
|
||||
resume_evaluations.csv
|
||||
greenhouse_resumes/*
|
||||
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ from pathlib import Path
|
|||
|
||||
from typing import Dict, List, Optional, Any
|
||||
from models import GitHubProfile
|
||||
from pdf import logger
|
||||
from prompts.template_manager import TemplateManager
|
||||
from prompt import DEFAULT_MODEL, MODEL_PARAMETERS
|
||||
from llm_utils import initialize_llm_provider, extract_json_from_response
|
||||
|
|
@ -80,6 +81,7 @@ def extract_github_username(github_url: str) -> Optional[str]:
|
|||
def fetch_github_profile(github_url: str) -> Optional[GitHubProfile]:
|
||||
try:
|
||||
username = extract_github_username(github_url)
|
||||
logger.info(f"{username}")
|
||||
if not username:
|
||||
print(f"Could not extract username from: {github_url}")
|
||||
return None
|
||||
|
|
@ -111,7 +113,7 @@ def fetch_github_profile(github_url: str) -> Optional[GitHubProfile]:
|
|||
print(f"GitHub user not found: {username}")
|
||||
return None
|
||||
else:
|
||||
print(f"GitHub API error: {response.status_code} - {response.text}")
|
||||
print(f"GitHub API error: {status_code} - {data}")
|
||||
return None
|
||||
|
||||
except requests.exceptions.RequestException as e:
|
||||
|
|
@ -398,6 +400,7 @@ def generate_projects_json(projects: List[Dict]) -> List[Dict]:
|
|||
|
||||
|
||||
def fetch_and_display_github_info(github_url: str) -> Dict:
|
||||
logger.info(f"{github_url}")
|
||||
github_profile = fetch_github_profile(github_url)
|
||||
if not github_profile:
|
||||
print("\n❌ Failed to fetch GitHub profile details.")
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ class EvaluationData(BaseModel):
|
|||
bonus_points: BonusPoints
|
||||
deductions: Deductions
|
||||
key_strengths: List[str] = Field(min_items=1, max_items=5)
|
||||
areas_for_improvement: List[str] = Field(min_items=1, max_items=3)
|
||||
areas_for_improvement: List[str] = Field(min_items=1, max_items=5)
|
||||
|
||||
|
||||
class GitHubProfile(BaseModel):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue