o
    Gh                     @   sB   d dl mZ d dlmZ d dlZd dlmZ dZG dd dZdS )    )LLM)settingsN)Pathz(user_journey_service/config/prompts.yamlc                   @   s$   e Zd Zdd Zdd Zdd ZdS )Synthesizerc              	   C   s@   t tj dtj tjtjtjtjtjtj	d| _
|  | _d S )N/)modeltemperatureapi_keyapi_baseapi_versionseedtimeout)r   r   PROVIDERLLM_FOR_REVIEWTEMPERATUREOPENAI_KEY2	ENDPOINT2API_VERSION2SEEDTIMEOUTllmload_promptsprompts)self r   /home/azureuser/microlearn/backend/user_journey_with_openai/agentic_workflow/src/user_journey_service/processors/user_journey_synthesizer.py__init__	   s   	zSynthesizer.__init__c                 C   s<   t ttd}t|W  d    S 1 sw   Y  d S )Nr)openr   prompts_pathyaml	safe_load)r   fr   r   r   r      s   $zSynthesizer.load_promptsc           
      C   sB   t d | jd }|j|||||d}d|dg}| j|}	|	S )NzInside synthesizer function....user_journey_synthesizer)designation
experienceskillscontent1content2user)rolecontent)printr   formatr   call)
r   r$   r&   r%   r'   r(   prompt_templatepromptmessagesresponser   r   r   review_and_combine   s   
#zSynthesizer.review_and_combineN)__name__
__module____qualname__r   r   r3   r   r   r   r   r      s    r   )	crewair    user_journey_service.core.configr   r    pathlibr   r   r   r   r   r   r   <module>   s    