a
    ~g	                     @   s   d dl mZmZ d dlmZmZmZmZ d dlm	Z	 dZ
e	e
ZdZedddefgZeeeefgd	Zd
Ze	eZdZedefdgZeeeefgd	ZdS )    )ConditionalPromptSelectoris_chat_model)AIMessagePromptTemplateChatPromptTemplateHumanMessagePromptTemplateSystemMessagePromptTemplate)PromptTemplatea}  The original question is as follows: {question}
We have provided an existing answer: {existing_answer}
We have the opportunity to refine the existing answer (only if needed) with some more context below.
------------
{context_str}
------------
Given the new context, refine the original answer to better answer the question. If the context isn't useful, return the original answer.a  We have the opportunity to refine the existing answer (only if needed) with some more context below.
------------
{context_str}
------------
Given the new context, refine the original answer to better answer the question. If the context isn't useful, return the original answer.)humanz
{question})aiz{existing_answer}r	   )default_promptconditionalszContext information is below. 
------------
{context_str}
------------
Given the context information and not prior knowledge, answer the question: {question}
zContext information is below.
------------
{context_str}
------------
Given the context information and not prior knowledge, answer any questionssystemN) langchain.chains.prompt_selectorr   r   langchain_core.prompts.chatr   r   r   r   langchain_core.prompts.promptr   DEFAULT_REFINE_PROMPT_TMPLfrom_templateDEFAULT_REFINE_PROMPTZrefine_templatefrom_messagesZCHAT_REFINE_PROMPTREFINE_PROMPT_SELECTORDEFAULT_TEXT_QA_PROMPT_TMPLDEFAULT_TEXT_QA_PROMPTZchat_qa_prompt_templateCHAT_QUESTION_PROMPTQUESTION_PROMPT_SELECTOR r   r   w/var/www/html/emsaiapi.evdpl.com/venv/lib/python3.9/site-packages/langchain/chains/question_answering/refine_prompts.py<module>   s>   


