Spaces:
Sleeping
Sleeping
quentinL52 commited on
Commit ·
29008de
1
Parent(s): 6aa5056
update
Browse files
src/services/graph_service.py
CHANGED
|
@@ -123,7 +123,8 @@ class GraphInterviewProcessor:
|
|
| 123 |
# --- Context builders ---
|
| 124 |
|
| 125 |
def _get_icebreaker_context(self, state: AgentState) -> str:
|
| 126 |
-
|
|
|
|
| 127 |
job = state["job_data"]
|
| 128 |
|
| 129 |
# Extract Hobbies/Interests if available
|
|
@@ -143,7 +144,7 @@ class GraphInterviewProcessor:
|
|
| 143 |
|
| 144 |
return f"""
|
| 145 |
=== CONTEXTE CANDIDAT ===
|
| 146 |
-
|
| 147 |
POSTE VISÉ: {job.get('poste', 'Non spécifié')}
|
| 148 |
ENTREPRISE: {job.get('entreprise', 'Non spécifié')}
|
| 149 |
|
|
@@ -340,7 +341,7 @@ class GraphInterviewProcessor:
|
|
| 340 |
|
| 341 |
# Extract first name
|
| 342 |
cv_info = state["cv_data"].get("info_personnelle", {})
|
| 343 |
-
prenom = cv_info.get("
|
| 344 |
|
| 345 |
# Get question limit
|
| 346 |
nb_questions = QUESTIONS_PER_AGENT.get(agent_key, 2)
|
|
@@ -348,7 +349,7 @@ class GraphInterviewProcessor:
|
|
| 348 |
try:
|
| 349 |
instructions = prompt_template.format(
|
| 350 |
user_id=state["user_id"],
|
| 351 |
-
|
| 352 |
nb_questions=nb_questions,
|
| 353 |
job_description=json.dumps(state["job_data"], ensure_ascii=False),
|
| 354 |
poste=state["job_data"].get("poste", "Poste non spécifié"),
|
|
|
|
| 123 |
# --- Context builders ---
|
| 124 |
|
| 125 |
def _get_icebreaker_context(self, state: AgentState) -> str:
|
| 126 |
+
cv = state["cv_data"]
|
| 127 |
+
prenom = cv.get("first_name", "Candidat")
|
| 128 |
job = state["job_data"]
|
| 129 |
|
| 130 |
# Extract Hobbies/Interests if available
|
|
|
|
| 144 |
|
| 145 |
return f"""
|
| 146 |
=== CONTEXTE CANDIDAT ===
|
| 147 |
+
PRENOM: {prenom}
|
| 148 |
POSTE VISÉ: {job.get('poste', 'Non spécifié')}
|
| 149 |
ENTREPRISE: {job.get('entreprise', 'Non spécifié')}
|
| 150 |
|
|
|
|
| 341 |
|
| 342 |
# Extract first name
|
| 343 |
cv_info = state["cv_data"].get("info_personnelle", {})
|
| 344 |
+
prenom = cv_info.get("first_name", "")
|
| 345 |
|
| 346 |
# Get question limit
|
| 347 |
nb_questions = QUESTIONS_PER_AGENT.get(agent_key, 2)
|
|
|
|
| 349 |
try:
|
| 350 |
instructions = prompt_template.format(
|
| 351 |
user_id=state["user_id"],
|
| 352 |
+
first_name=prenom,
|
| 353 |
nb_questions=nb_questions,
|
| 354 |
job_description=json.dumps(state["job_data"], ensure_ascii=False),
|
| 355 |
poste=state["job_data"].get("poste", "Poste non spécifié"),
|