quentinL52 commited on
Commit
29008de
·
1 Parent(s): 6aa5056
Files changed (1) hide show
  1. src/services/graph_service.py +5 -4
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
- candidat = state["cv_data"].get("info_personnelle", {})
 
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
- NOM: {candidat.get('nom', 'Candidat')} {candidat.get('first_name', '')}
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("prenom", "")
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
- prenom=prenom,
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é"),