
    KKi                     z    S SK Jr  S SKJr  S SKJr   " S S\\\\4      5      r	Sr
\" \
/ SQS9rS	r\" \/ S
QS9rg)    )BaseOutputParser)PromptTemplate)overridec                   P    \ rS rSr% SrSr\\S'    \S\S\	\\
4   4S j5       rSrg	)
FinishedOutputParser   z4Output parser that checks if the output is finished.FINISHEDfinished_valuetextreturnc                 |    UR                  5       nU R                  U;   nUR                  U R                  S5      U4$ )N )stripr
   replace)selfr   cleanedfinisheds       h/var/www/html/dynamic-report/venv/lib/python3.13/site-packages/langchain_classic/chains/flare/prompts.pyparseFinishedOutputParser.parse   s9    **,&&'1t22B7AA     N)__name__
__module____qualname____firstlineno____doc__r
   str__annotations__r   tupleboolr   __static_attributes__r   r   r   r   r      s?    >$NC$6B# B%T	"2 B Br   r   zRespond to the user message using any relevant context. If context is provided, you should ground your answer in that context. Once you're done responding return FINISHED.

>>> CONTEXT: {context}
>>> USER INPUT: {user_input}
>>> RESPONSE: {response})
user_inputcontextresponse)templateinput_variablesa&  Given a user input and an existing partial response as context, ask a question to which the answer is the given term/entity/phrase:

>>> USER INPUT: {user_input}
>>> EXISTING PARTIAL RESPONSE: {current_response}

The question to which the answer is the term/entity/phrase "{uncertain_span}" is:)r#   current_responseuncertain_spanN)langchain_core.output_parsersr   langchain_core.promptsr   typing_extensionsr   r    r   r!   r   PROMPT_TEMPLATEPROMPT"QUESTION_GENERATOR_PROMPT_TEMPLATEQUESTION_GENERATOR_PROMPTr   r   r   <module>r1      s`    : 1 &
B+E#t),<= 
B 
9
&U " +/H r   