| Server IP : 157.230.181.24 / Your IP : 216.73.217.11 Web Server : Apache/2.4.58 (Ubuntu) System : Linux conductive 6.8.0-117-generic #117-Ubuntu SMP PREEMPT_DYNAMIC Tue May 5 19:26:24 UTC 2026 x86_64 User : ( 1000) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /opt/aim-bots/__pycache__/ |
Upload File : |
�
�D`j�% � �� � d Z ddlmZ ddlZddlZddlmZ ddlmZm Z G d� d� Z
e G d� d � � Z G d
� d� Z G d� d
e� Z
G d� de� Z G d� de� Zdd�Zdd�Zy)uO Generate novel AIM replies in a persona's voice — never copies archive lines.� )�annotationsN)�defaultdict)� dataclass�fieldc �( � e Zd ZdZdd�Zdd�Zdd�Zy) �StyleAdapter))z \bDon't\b�dont)z \bdon't\br )z \bCan't\b�cant)z \bcan't\br
)z \bWon't\b�wont)z \bwon't\br )z\bI'm\bzi'm)z\bIt's\bzit's)z
\bYou're\bzyou're)z\bHaha\b�haha)z
\bHahaha\b�hahahah)z \bHahah\b�hahah)z\bLol\b�lol)z\bWow\b�wow)z\bUnfortunately\b�
Unfortunantly)z\bRofl\b�roflc �n � || _ |j dd� | _ |j dd� | _ y )N�pct_lowercase_start�ffffff�?�pct_no_end_punctg�������?)�voice�get�lowercase_rate�
no_punct_rate)�selfr s �/opt/aim-bots/persona_actor.py�__init__zStyleAdapter.__init__ s1 � ���
�#�i�i�(=�s�C���"�Y�Y�'9�3�?��� c �� � |j � }|s|S | j D ] \ }}t j |||� }� t j � | j
k r=|d j
� r*|j d� s|d j � |dd z }t j � | j k r5t |� dk r'|j d� r|j d� s|d d }|S )Nr �I� �( �.z...���)�strip�REPLACEMENTS�re�sub�randomr �isupper�
startswith�lowerr �len�endswith)r �text�pattern�repls r �applyzStyleAdapter.apply% s� � ��z�z�|����K�!�.�.� /�M�G�T��6�6�'�4��.�D� /��=�=�?�T�0�0�0�T�!�W�_�_�5F�t���_b�Oc���7�=�=�?�T�!�"�X�-�D��M�M�O�d�0�0�0��D� �B���
�
�c�"��M�M�%�(����9�D��r c �l � |D �cg c]$ }|j � s�| j |� ��& c}S c c}w �N)r% r2 )r �parts�ps r � apply_allzStyleAdapter.apply_all6 s&