
    @'h	                        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	j                  e
      ZdZ ej                  dddefg      Z eeeefg	      Zd
Z e	j                  e      ZdZ ej                  defdg      Z eeeefg	      Zy)    )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_PROMPTrefine_templatefrom_messagesCHAT_REFINE_PROMPTREFINE_PROMPT_SELECTORDEFAULT_TEXT_QA_PROMPT_TMPLDEFAULT_TEXT_QA_PROMPTchat_qa_prompt_templateCHAT_QUESTION_PROMPTQUESTION_PROMPT_SELECTOR     y/home/kushmeetdev/Regenta/Chatbot/venv/lib/python3.12/site-packages/langchain/chains/question_answering/refine_prompts.py<module>r!      s    U  9	?  5445OP ?  6'55#	/"  3( "456 (  6556QR   8)77	*+  5) "678 r   