+
    )Žj<  c                   ó˜   € ^ RI t^ RIHu Ht ^ RIHtHt ^ RI	H
t
 ^ RIHt  ! R R4      tR R ltR	 R
 ltR R ltR R ltR R ltR# )é    N)ÚEngineÚInputDocument)ÚOllamaResult)Útranscription_promptc                   ó:   a € ] tR t^t o RtRV 3R lR lltRtV tR# )Ú
FakeClientzmodelo-testec                ó2   <€ V ^8„  d   QhRS[ RS[RS[RS[/# )é   ÚimageÚpromptÚdocument_typeÚreturn)ÚbytesÚstrr   )ÚformatÚ__classdict__s   "€Ú,/Volumes/www/pataniscAI/tests/test_engine.pyÚ__annotate__ÚFakeClient.__annotate__	   s*   ø€ ÷ 6ñ 6¡ð 6©sð 6Á3ð 6ÑP\ñ 6ó    c                óœ  € R qAV8H  qU'       g±   \         P                  ! RV3RW34      RR\        P                  ! 4       9   g   \         P                  ! V4      '       d   \         P
                  ! V4      MRR\         P
                  ! V4      /,          pRRV/,          p\        \         P                  ! V4      4      hR;rTRqˆV9   qD'       g±   \         P                  ! RV3RW‚34      R\         P
                  ! V4      RR	\        P                  ! 4       9   g   \         P                  ! V4      '       d   \         P
                  ! V4      MR	/,          pRRV/,          p\        \         P                  ! V4      4      hR;r„R
qCV8H  qU'       g±   \         P                  ! RV3RW434      RR\        P                  ! 4       9   g   \         P                  ! V4      '       d   \         P
                  ! V4      MRR\         P
                  ! V4      /,          pRRV/,          p\        \         P                  ! V4      4      hR;rT\        R^R4      # )ó   imagemÚpy0r
   Úpy3úassert %(py5)sÚpy5NzNao expliquesÚpy1r   Úcc_versor   úNISS 123i€„ ©ú==)z%(py0)s == %(py3)s©Úin©z%(py1)s in %(py3)s)	Ú
@pytest_arÚ_call_reprcompareÚ@py_builtinsÚlocalsÚ_should_repr_global_nameÚ	_safereprÚAssertionErrorÚ_format_explanationr   )	Úselfr
   r   r   Ú@py_assert2Ú@py_assert1Ú@py_format4Ú@py_format6Ú@py_assert0s	   &&&&     r   Ú
transcribeÚFakeClient.transcribe	   s+  € Ø!Ð!˜	Ñ!×!×!×!Ó!ˆu×!×!×!×!×!×!ˆu×!×!×!Ò!ˆu×!×!Ö!˜	×!×!×!×!×!×!×!Ð!ØÐ( &Ñ(×(×(×(Ó(ˆ×(×(Õ(ˆ×(×(×(×(×(Ö( &×(×(×(Ò( &×(×(×(×(×(×(×(Ò(Ø *Ð* 
Ñ*×*×*×*Ó*ˆ}×*×*×*×*×*×*ˆ}×*×*×*Ò*ˆ}×*×*Ö* 
×*×*×*×*×*×*×*Ð*Ü˜J¨¨9Ó5Ð5r   © N)Ú )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Úmodelr2   Ú__static_attributes__Ú__classdictcell__)r   s   @r   r   r      s   ø‡ € Ø€E÷6÷ 6ð 6r   r   c                ó   € V ^8„  d   QhRR/# ©r	   r   Nr4   )r   s   "r   r   r      s   € ÷ 4ñ 4ÈTñ 4r   c                  ó0  € \        \        4       4      P                  \        R RRR4      .4      p V R,          pRq!VJ q3'       gy   \        P
                  ! RV3RW34      R\        P                  ! V4      R\        P                  ! V4      /,          pRR	V/,          p\        \        P                  ! V4      4      hR
;p;r2V R,          p/ q!V8H  q3'       gy   \        P
                  ! RV3RW34      R\        P                  ! V4      R\        P                  ! V4      /,          pRR	V/,          p\        \        P                  ! V4      4      hR
;p;r2V R,          ^ ,          R,          pRq!V8H  q3'       gy   \        P
                  ! RV3RW34      R\        P                  ! V4      R\        P                  ! V4      /,          pRR	V/,          p\        \        P                  ! V4      4      hR
;p;r2V R,          ^ ,          R,          pRq!VJ q3'       gy   \        P
                  ! RV3RW34      R\        P                  ! V4      R\        P                  ! V4      /,          pRR	V/,          p\        \        P                  ! V4      4      hR
;p;r2R
# )zdoc-1z	verso.pngr   r   ÚsuccessTr   Úpy4zassert %(py6)sÚpy6NÚresultsÚtranscriptionsÚtextr   Ú	documentsÚocr_ok)Úis)z%(py1)s is %(py4)sr   )z%(py1)s == %(py4)s)	r   r   Úextractr   r$   r%   r)   r*   r+   )Úresultr1   Ú@py_assert3r-   Ú@py_format5Ú@py_format7s         r   ÚCtest_engine_returns_transcription_without_logging_or_parsing_fieldsrN      s  € Ü”J“LÓ!×)Ñ)Ü	w ¨Z¸Ó	CÐDó€Fð )ÕÐ$ Ð$ Ð$×$×$×$Ó$Ð×$×$Õ$Ð×$×$Ô$ ×$×$×$×$×$×$×$Ò$Ø)ÕÐ" Ð" Ñ"×"×"×"Ó"Ð×"×"Õ"Ð×"×"Ô" ×"×"×"×"×"×"×"Ò"ØÐ"Õ# AÕ& vÕ.Ð<°*Ð<°*Ñ<×<×<×<Ó<Ð.×<×<Õ<Ð.×<×<Ô<°*×<×<×<×<×<×<×<Ò<Ø+Õ˜qÕ! (Õ+Ð3¨tÐ3¨tÐ3×3×3×3Ó3Ð+×3×3Õ3Ð+×3×3Ô3¨t×3×3×3×3×3×3×3Ô3r   c                ó   € V ^8„  d   QhRR/# r>   r4   )r   s   "r   r   r      s   € ÷ %ñ %Àñ %r   c                  óœ  € \        R 4      p RqV 9   q"'       g±   \        P                  ! R
V3RW34      R\        P                  ! V4      RR\        P
                  ! 4       9   g   \        P                  ! V 4      '       d   \        P                  ! V 4      MR/,          pRRV/,          p\        \        P                  ! V4      4      hR;rRqV 9   q"'       g±   \        P                  ! R
V3RW34      R\        P                  ! V4      RR\        P
                  ! 4       9   g   \        P                  ! V 4      '       d   \        P                  ! V 4      MR/,          pRRV/,          p\        \        P                  ! V4      4      hR;rR	qV 9   q"'       g±   \        P                  ! R
V3RW34      R\        P                  ! V4      RR\        P
                  ! 4       9   g   \        P                  ! V 4      '       d   \        P                  ! V 4      MR/,          pRRV/,          p\        \        P                  ! V4      4      hR;rR# )Úrc_validadezVIGENTE ATEr   r   r   r   r   NzNao uses outras datasú[NAO_LEGIVEL]r!   r#   ©	r   r$   r%   r)   r&   r'   r(   r*   r+   ©r   r1   r-   r/   r0   s        r   Ú7test_rc_focused_prompt_forbids_other_dates_and_guessingrU      s(  € Ü! -Ó0€FØÐ"˜FÑ"×"×"×"Ó"ˆ=×"×"Õ"ˆ=×"×"×"×"×"Ö"˜F×"×"×"Ò"˜F×"×"×"×"×"×"×"Ò"Ø"Ð, fÑ,×,×,×,Ó,Ð"×,×,Õ,Ð"×,×,×,×,×,Ö, f×,×,×,Ò, f×,×,×,×,×,×,×,Ò,ØÐ$˜fÑ$×$×$×$Ó$ˆ?×$×$Õ$ˆ?×$×$×$×$×$Ö$˜f×$×$×$Ò$˜f×$×$×$×$×$×$×$Ô$r   c                ó   € V ^8„  d   QhRR/# r>   r4   )r   s   "r   r   r   !   s   € ÷ Xñ X¨dñ Xr   c                  óD  € R p Rp\        W4      pRq2V8H  qD'       gû   \        P                  ! RV3RW#34      RR\        P                  ! 4       9   g!   \        P
                  ! \         4      '       d   \        P                  ! \         4      MRR\        P                  ! V 4      R\        P                  ! V4      R\        P                  ! V4      R\        P                  ! V4      /,          pR	R
V/,          p\        \        P                  ! V4      4      hR;p ;p;p;rCR# )rQ   zglm-ocr:latestzText Recognition:r   r   Úpy2rA   rB   Úpy9zassert %(py11)sÚpy11Nr   )z9%(py6)s
{%(py6)s = %(py0)s(%(py2)s, %(py4)s)
} == %(py9)s)	r   r$   r%   r&   r'   r(   r)   r*   r+   )r.   rK   Ú@py_assert5Ú@py_assert8Ú@py_assert7Ú@py_format10Ú@py_format12s          r   Ú$test_glm_uses_canonical_short_promptr`   !   s¢   € Ø -ÐWÐ/?ÐWÔ Ó@ÐWÐDWÐWÐDWÑW×W×W×WÓWÐ@×W×W×W×W×W×WÔ×W×W×WÒWÔ×W×WÖW ×W×WÔWÐ/?×W×WÔWÐ@×W×WÔWÐDW×W×W×W×W×W×W×W×WÐWr   c                ó   € V ^8„  d   QhRR/# r>   r4   )r   s   "r   r   r   %   s   € ÷ 7ñ 7Àñ 7r   c                  ó  € \        R R4      p RqV 9   q"'       g±   \        P                  ! R
V3RW34      R\        P                  ! V4      RR\        P
                  ! 4       9   g   \        P                  ! V 4      '       d   \        P                  ! V 4      MR/,          pRRV/,          p\        \        P                  ! V4      4      hR;rR	qV 9  q"'       g±   \        P                  ! RV3RW34      R\        P                  ! V4      RR\        P
                  ! 4       9   g   \        P                  ! V 4      '       d   \        P                  ! V 4      MR/,          pRRV/,          p\        \        P                  ! V4      4      hR;rR# )Úrcz%AuditAid/PaddleOCR-VL-1.6-0.9B:latestzTranscreve todo o texto visivelr   r   r   r   r   NzOmite todo o restante textor!   r#   )únot in)z%(py1)s not in %(py3)srS   rT   s        r   Ú7test_paddle_rc_prompt_still_requests_full_transcriptionre   %   sÏ   € Ü! $Ð(OÓP€FØ,Ð6°Ñ6×6×6×6Ó6Ð,×6×6Õ6Ð,×6×6×6×6×6Ö6°×6×6×6Ò6°×6×6×6×6×6×6×6Ò6Ø(Ð6°Ñ6×6×6×6Ó6Ð(×6×6Õ6Ð(×6×6×6×6×6Ö6°×6×6×6Ò6°×6×6×6×6×6×6×6Ô6r   c                ó   € V ^8„  d   QhRR/# r>   r4   )r   s   "r   r   r   +   s   € ÷ %ñ %Èñ %r   c                  óœ  € \        R 4      p RqV 9   q"'       g±   \        P                  ! RV3RW34      R\        P                  ! V4      RR\        P
                  ! 4       9   g   \        P                  ! V 4      '       d   \        P                  ! V 4      MR/,          pRRV/,          p\        \        P                  ! V4      4      hR;rRqV 9   q"'       g±   \        P                  ! RV3RW34      R\        P                  ! V4      RR\        P
                  ! 4       9   g   \        P                  ! V 4      '       d   \        P                  ! V 4      MR/,          pRRV/,          p\        \        P                  ! V4      4      hR;rR	qV 9   q"'       g±   \        P                  ! RV3RW34      R\        P                  ! V4      RR\        P
                  ! 4       9   g   \        P                  ! V 4      '       d   \        P                  ! V 4      MR/,          pRRV/,          p\        \        P                  ! V4      4      hR;rR
qV 9   q"'       g±   \        P                  ! RV3RW34      R\        P                  ! V4      RR\        P
                  ! 4       9   g   \        P                  ! V 4      '       d   \        P                  ! V 4      MR/,          pRRV/,          p\        \        P                  ! V4      4      hR;rRqV 9   q"'       g±   \        P                  ! RV3RW34      R\        P                  ! V4      RR\        P
                  ! 4       9   g   \        P                  ! V 4      '       d   \        P                  ! V 4      MR/,          pRRV/,          p\        \        P                  ! V4      4      hR;rR# )Úcc_frente_identificacaou   N.Âº DOCUMENTOr   r   r   r   r   NÚVALIDADEzdata de nascimentoz+Nao corrijas, nao completes e nao adivinhesrR   r!   r#   rS   rT   s        r   Ú?test_cc_front_focused_prompt_forbids_guessing_and_other_numbersrj   +   sé  € Ü!Ð";Ó<€FØÐ%˜vÑ%×%×%×%Ó%Ð×%×%Õ%Ð×%×%×%×%×%Ö%˜v×%×%×%Ò%˜v×%×%×%×%×%×%×%Ò%ØÐ˜Ñ×××Óˆ:××Õˆ:×××××Ö˜×××Ò˜×××××××ÒØÐ) 6Ñ)×)×)×)Ó)Ð×)×)Õ)Ð×)×)×)×)×)Ö) 6×)×)×)Ò) 6×)×)×)×)×)×)×)Ò)Ø8ÐB¸FÑB×B×B×BÓBÐ8×B×BÕBÐ8×B×B×B×B×BÖB¸F×B×B×BÒB¸F×B×B×B×B×B×B×BÒBØÐ$˜fÑ$×$×$×$Ó$ˆ?×$×$Õ$ˆ?×$×$×$×$×$Ö$˜f×$×$×$Ò$˜f×$×$×$×$×$×$×$Ô$r   )Úbuiltinsr&   Ú_pytest.assertion.rewriteÚ	assertionÚrewriter$   Úpataniscai.enginer   r   Úpataniscai.ollamar   Úpataniscai.promptsr   r   rN   rU   r`   re   rj   r4   r   r   Ú<module>rr      s7   ðß  „ × 3Ý *Ý 3÷6ñ 6õ4õ%õXõ7÷%r   