generated from kgod/ai-review-template
feat: initialize resume agent with OfferPai sync
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
"""Skill group updates that preserve recommender-assigned categories.
|
||||
|
||||
apply_update_skill_groups lives in an over-limit module and keeps keyword-only
|
||||
classification for manual patch edits; this wrapper reuses its cleaning and then
|
||||
re-groups with the recommender's (LLM) categories, which win over keywords.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from .resume_document_mutations import apply_update_skill_groups
|
||||
from .skill_classifier import classify_skills
|
||||
|
||||
|
||||
def update_skill_groups(
|
||||
content: dict[str, Any], skills: list[Any], preferred_categories: dict[str, str] | None = None
|
||||
) -> dict[str, Any]:
|
||||
result = apply_update_skill_groups(content, skills)
|
||||
flat = [skill for group in result.get("skill_groups") or [] for skill in group.get("skills") or []]
|
||||
result["skill_groups"] = classify_skills(flat, preferred=preferred_categories)
|
||||
return result
|
||||
Reference in New Issue
Block a user