§
     ’Þj)  ã                   ó(   — d Z dddœZd„ Zd„ Zdd„ZdS )	a  The prompt enhancer called from inside a running WanGP process (a generation or an exploration task, a plugin job): the caller already
owns the GPU, so no GPU lock is asked for (asking would wait for the caller itself). WanGP registers its runner at startup; enhance()
runs the configured enhancer (local or remote engine) on texts with the caller's instructions. A local engine is loaded for the call and
unloaded after it, the caller's models leaving the VRAM first (MMGP brings them back at their next forward).N©ÚenhanceÚ	availablec                 ó>   — t                                | |¬¦  «         dS )zvenhance(texts, instructions, max_tokens, seed) -> one text per text; available() -> whether an enhancer is configured.r   N)Ú_runnerÚupdater   s     úIC:\Users\johnn\OneDrive\Documents\AI\shared\prompt_enhancer\in_process.pyÚregisterr	   	   s   € å‡N‚N˜7¨i€NÑ8Ô8Ð8Ð8Ð8ó    c                  óH   — t           d         duot          d         ¦   «         S )zAWhether a prompt enhancer is configured (outside WanGP, none is).r   N©r   © r
   r   r   r      s"   € å�;Ô tÐ+ÐFµ¸Ô0DÑ0FÔ0FÐFr
   é   é    c                 ó2   — t          d         | |||¦  «        S )zkThe texts rewritten by the prompt enhancer following instructions (its system prompt), one result per text.r   r   )ÚtextsÚinstructionsÚ
max_tokensÚseeds       r   r   r      s   € å�9Ô˜e \°:¸tÑDÔDÐDr
   )r   r   )Ú__doc__r   r	   r   r   r   r
   r   ú<module>r      se   ððpð pð ¨Ð
.Ð
.€ð9ð 9ð 9ð
Gð Gð Gð
Eð Eð Eð Eð Eð Er
   