datacipen commited on
Commit
44f2f2c
1 Parent(s): 85f58b5

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +7 -3
main.py CHANGED
@@ -461,7 +461,9 @@ async def start():
461
 
462
  @literal_client.step(type="run")
463
  async def construction_NCS(competenceList):
464
- context = await contexte(competenceList)
 
 
465
  emploisST = context.to_string(index = False)
466
  if chatProfile[1] == 'ROMESKILLS':
467
  romeListArray = cl.user_session.get("codeRomeArray")
@@ -526,8 +528,10 @@ async def recuperation_contexte(getNote):
526
  getContext = cl.user_session.get(getNote)
527
  return getNote + " :\n" + getContext
528
  @cl.step(type="retrieval")
529
- async def contexte(competence):
530
- if chatProfile[1] == 'ROMESKILLS':
 
 
531
  results = await creation_liste_code_Rome(competence, cl.user_session.get("categorie"))
532
  else:
533
  results = await creation_liste_skills_Esco(competence, cl.user_session.get("categorie"))
 
461
 
462
  @literal_client.step(type="run")
463
  async def construction_NCS(competenceList):
464
+ chat_profile = cl.user_session.get("chat_profile")
465
+ chatProfile = chat_profile.split(' - ')
466
+ context = await contexte(competenceList, chatProfile[1])
467
  emploisST = context.to_string(index = False)
468
  if chatProfile[1] == 'ROMESKILLS':
469
  romeListArray = cl.user_session.get("codeRomeArray")
 
528
  getContext = cl.user_session.get(getNote)
529
  return getNote + " :\n" + getContext
530
  @cl.step(type="retrieval")
531
+ async def contexte(competence, chatProfile):
532
+ chat_profile = cl.user_session.get("chat_profile")
533
+ chatProfile = chat_profile.split(' - ')
534
+ if chatProfile == 'ROMESKILLS':
535
  results = await creation_liste_code_Rome(competence, cl.user_session.get("categorie"))
536
  else:
537
  results = await creation_liste_skills_Esco(competence, cl.user_session.get("categorie"))