Ë
    I»j”  ã                   óT   — d Z ddlmZ ddlmZ ddlmZmZmZ ddl	m
Z
  G d„ d«      Zy)	zAI job description drafting.é    )Úrender_jd_draft_prompts)Ú	JobStatus)ÚJobDescriptionDraftRequestÚJobDescriptionDraftResponseÚJobDescriptionSections)Úgenerate_jsonc                   ó   — e Zd Zdedefd„Zy)ÚJobDescriptionsServiceÚpayloadÚreturnc              ƒ   óö  ‡K  — t        ‰j                  ‰j                  ‰j                  xs d‰j                  xs d‰j
                  j                  ‰j                  xs d‰j                  ‰j                  ‰j                  ‰j                  xs d‰j                  xs d‰j                  ¬«      \  }}|dz  }dt        fˆfd„}t        |||¬«      ƒ d {  –—† \  }}}|j!                  d«      xs i }t#        |j!                  d«      t%        |j!                  d	«      xs g «      t%        |j!                  d
«      xs g «      t%        |j!                  d«      xs g «      t%        |j!                  d«      xs g «      ¬«      }	t'        ‰j(                  ‰j                  ‰j                  t*        j,                  |d|› �||dœ|j!                  d«      xs ‰j                  |j!                  d«      |	¬«
      S 7 �Œ ­w)NÚ )ÚpersonaÚ
role_titleÚ	seniorityÚ
departmentÚemployment_typeÚlocationÚmust_have_skillsÚnice_to_have_skillsÚresponsibilitiesÚcompany_contextÚ
tone_notesÚlanguagez�
Return JSON: {"title","markdown","sections":{"summary","responsibilities":[],"requirements":[],"nice_to_have":[],"benefits":[]}}r   c                  óÆ  •— ‰j                   xs dg} ‰j                  xs d‰j                  › d�ddg}| D �cg c]  }d|› �‘Œ	 }}d‰j                  › d‰j                  rd	‰j                  z   nd
› d�}d‰j                  › d|› d�dj	                  d„ |D «       «      z   dz   dj	                  d„ |D «       «      z   }‰j                  ||||‰j
                  ddgdœdœS c c}w )Nzrelevant domain skillszOwn delivery for the z	 functionz*Collaborate with cross-functional partnersz)Improve processes and measurable outcomeszProven experience with zWe are hiring a z to drive impactz in r   Ú.z# z

z

## Responsibilities
Ú
c              3   ó&   K  — | ]	  }d |› �–— Œ y­w©z- N© ©Ú.0Úrs     ú7/var/www/html/TJ-AI/tj/app/services/job_descriptions.pyÚ	<genexpr>z>JobDescriptionsService.draft.<locals>.local.<locals>.<genexpr>4   ó   è ø€ Ð3©d¨˜b  œH©dùó   ‚z

## Requirements
c              3   ó&   K  — | ]	  }d |› �–— Œ y­wr   r    r!   s     r$   r%   z>JobDescriptionsService.draft.<locals>.local.<locals>.<genexpr>6   r&   r'   zCompetitive compensationzGrowth opportunities©Úsummaryr   ÚrequirementsÚnice_to_haveÚbenefits)ÚtitleÚmarkdownÚsections)r   r   r   r   Újoinr   )ÚskillsÚrespÚsÚreqsr*   r/   r   s         €r$   Úlocalz+JobDescriptionsService.draft.<locals>.local%   s:  ø€ Ø×-Ñ-ÒKÐ2JÐ1KˆFØ×+Ñ+ò Ø'¨×(:Ñ(:Ð';¸9ÐEØ<Ø;ð0ˆDñ
 <BÓB¹6°aÐ-¨a¨SÒ1¸6ˆDÐBà" 7×#5Ñ#5Ð"6Ð6FØ29×2DÒ2D�6˜G×.Ñ.Ò.È"ÐMÈQðPð ð
 �W×'Ñ'Ð(¨¨W¨Ið 6(ð )à—)‘)Ñ3©dÓ3Ó3ñ4ð *ñ*ð —)‘)Ñ3©dÓ3Ó3ñ	4ð ð !×+Ñ+Ø$à&Ø(,Ø$(Ø$+×$?Ñ$?Ø!;Ð=SÐ Tññ
ð 
ùò Cs   ¸C)ÚsystemÚuserÚlocal_factoryr0   r*   r   r+   r,   r-   r)   zDrafted JD via )r7   r8   r.   r/   )
Úcorrelation_idr   r   ÚstatusÚstubÚmessageÚprompt_previewr.   r/   r0   )r   r   r   r   r   r   Úvaluer   r   r   r   r   r   r   Údictr   Úgetr   Úlistr   r:   r   Ú	SUCCEEDED)
Úselfr   r7   r8   r6   Údatar<   ÚproviderÚsections_rawr0   s
    `        r$   ÚdraftzJobDescriptionsService.draft   sÛ  øè ø€ ô /Ø—O‘OØ×)Ñ)Ø×'Ñ'Ò-¨2Ø×)Ñ)Ò/¨RØ#×3Ñ3×9Ñ9Ø×%Ñ%Ò+¨Ø$×5Ñ5Ø '× ;Ñ ;Ø$×5Ñ5Ø#×3Ñ3Ò9°rØ×)Ñ)Ò/¨RØ×%Ñ%ô
‰ˆ�ð 	ð4ñ	
ˆð	”tõ 	ô> &3Ø °Eô&
÷  
Ñˆˆd�Hð —x‘x 
Ó+Ò1¨rˆÜ)Ø ×$Ñ$ YÓ/Ü! ,×"2Ñ"2Ð3EÓ"FÒ"LÈ"ÓMÜ˜l×.Ñ.¨~Ó>ÒDÀ"ÓEÜ˜l×.Ñ.¨~Ó>ÒDÀ"ÓEÜ˜,×*Ñ*¨:Ó6Ò<¸"Ó=ô
ˆô +Ø"×1Ñ1Ø×)Ñ)Ø—O‘OÜ×&Ñ&ØØ% h ZÐ0Ø&,°dÑ;Ø—(‘(˜7Ó#Ò9 w×'9Ñ'9Ø—X‘X˜jÓ)Øô
ð 	
ð 
ûs   ƒCG9ÃG6ÃD G9N)Ú__name__Ú
__module__Ú__qualname__r   r   rH   r    ó    r$   r
   r
      s   „ ðL
Ø1ðL
à	$ôL
rL   r
   N)Ú__doc__Úapp.promptsr   Úapp.schemas.commonr   Úapp.schemas.job_descriptionsr   r   r   Úapp.services.ai_generater   r
   r    rL   r$   Ú<module>rR      s)   ðÙ "å /Ý (÷ñ õ
 3÷M
ò M
rL   