
    +jN                     l   S SK Jr  S SKJr  S SKJrJr   " S S\\5      r " S S\5      r	 " S S	\5      r
 " S
 S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r\\-  r " S S\5      r " S S\5      r " S S\5      rg )!    )Enum)Literal)	BaseModelFieldc                       \ rS rSrSrSrSrg)AnthropicRole   user	assistant N)__name__
__module____qualname____firstlineno__r
   r   __static_attributes__r       >/home/wildlama/comfy/ComfyUI/comfy_api_nodes/apis/anthropic.pyr   r      s    DIr   r   c                   D    \ rS rSr% Sr\S   \S'   \" S5      r\	\S'   Sr
g)AnthropicTextContent   texttype.r   Nr   r   r   r   r   r   __annotations__r   r   strr   r   r   r   r   r          "D'&/"c
D#r   r   c                   Z    \ rS rSr% Sr\S   \S'   \" SSS9r\	\S'   \" SSS9r
\	\S	'   S
rg)AnthropicImageSourceBase64   base64r   .z2MIME type of the image, e.g. image/png, image/jpegdescription
media_typezBase64-encoded image datadatar   N)r   r   r   r   r   r   r   r   r#   r   r$   r   r   r   r   r   r      s5    &D'(
&C-abJbc'BCD#Cr   r   c                   D    \ rS rSr% Sr\S   \S'   \" S5      r\	\S'   Sr
g)AnthropicImageSourceUrl   urlr   .r   N)r   r   r   r   r   r   r   r   r(   r   r   r   r   r   r&   r&      s     D'%. SzCr   r&   c                   J    \ rS rSr% Sr\S   \S'   \" S5      r\	\
-  \S'   Srg)AnthropicImageContent   imager   .sourcer   N)r   r   r   r   r   r   r   r   r-   r   r&   r   r   r   r   r*   r*      s&    $D''
$CH:F&)@@Mr   r*   c                   V    \ rS rSr% \" S5      r\\S'   \" S5      r\	\
\-     \S'   Srg)AnthropicMessage!   .rolecontentr   N)r   r   r   r   r   r1   r   r   r2   listr   r*   r   r   r   r   r/   r/   !   s*    *D-$BG*GT&)>>?Lr   r/   c                   V    \ rS rSr% \" S5      r\S   \S'   \" SSSS9r\	S-  \S	'   S
r
g)AnthropicThinkingConfig&   .)enableddisabledadaptiver   Ni   zVReasoning budget in tokens. Used when type is 'enabled'. Must be less than max_tokens.)ger"   budget_tokensr   )r   r   r   r   r   r   r   r   r;   intr   r   r   r   r5   r5   &   s3    7<SzD'3
4A %l!M3: r   r5   c                   @    \ rS rSr% Sr\" S5      r\S   S-  \S'   Sr	g)AnthropicOutputConfig.   z=Used with `thinking.type='adaptive'` on models like Opus 4.7.N)lowmediumhigheffortr   )
r   r   r   r   __doc__r   rC   r   r   r   r   r   r   r>   r>   .   s    G6;DkFG+,t3Ar   r>   c                   J   \ rS rSr% \" S5      r\\S'   \" S5      r\	\
   \S'   \" SSS9r\\S'   \" SS	S
9r\S-  \S'   \" SSSS9r\S-  \S'   \" SSSS9r\S-  \S'   \" SSS9r\S-  \S'   \" S5      r\	\   S-  \S'   \" S5      r\S-  \S'   \" S5      r\S-  \S'   Srg)AnthropicMessagesRequest3   .modelmessages   )r:   
max_tokensNzTop-level system promptr!   systemg        g      ?)r:   letemperaturetop_pr   top_kstop_sequencesthinkingoutput_configr   )r   r   r   r   r   rH   r   r   rI   r3   r/   rK   r<   rL   rN   floatrO   rP   rQ   rR   r5   rS   r>   r   r   r   r   rF   rF   3   s    sE3',SzHd#$1CA&J&t1JKFC$JK %dss ;K;5E54<5dq)E3:)',T{NDI$2/4T{H%,:27+M(4/=r   rF   c                   D    \ rS rSr% Sr\S   \S'   \" S5      r\	\S'   Sr
g)AnthropicResponseTextBlock@   r   r   .r   Nr   r   r   r   rV   rV   @   r   r   rV   c                   D    \ rS rSr% Sr\S   \S'   \" S5      r\	\S'   Sr
g)AnthropicResponseThinkingBlockE   rR   r   .r   N)r   r   r   r   r   r   r   r   rR   r   r   r   r   r   rY   rY   E   s     *D'*
*#JHcr   rY   c                   V    \ rS rSr% \" S5      r\S-  \S'   \" S5      r\S-  \S'   Sr	g)AnthropicCacheCreationUsageM   Nephemeral_5m_input_tokensephemeral_1h_input_tokensr   )
r   r   r   r   r   r^   r<   r   r_   r   r   r   r   r\   r\   M   s(    ,1$KsTz7,1$KsTz7r   r\   c                       \ rS rSr% \" S5      r\S-  \S'   \" S5      r\S-  \S'   \" S5      r	\S-  \S'   \" S5      r
\S-  \S'   \" S5      r\S-  \S'   Srg)	AnthropicMessagesUsageR   Ninput_tokensoutput_tokenscache_creation_input_tokenscache_read_input_tokenscache_creationr   )r   r   r   r   r   rc   r<   r   rd   re   rf   rg   r\   r   r   r   r   ra   ra   R   s`    $T{L#** %dM3:+.3Dkt9*/+S4Z59>tN/$6Dr   ra   c                      \ rS rSr% \" S5      r\S-  \S'   \" S5      r\S-  \S'   \" S5      r	\S-  \S'   \" S5      r
\S-  \S'   \" S5      r\\   S-  \S'   \" S5      r\S-  \S'   \" S5      r\S-  \S	'   \" S5      r\S-  \S
'   Srg)AnthropicMessagesResponseZ   Nidr   r1   rH   r2   stop_reasonstop_sequenceusager   )r   r   r   r   r   rk   r   r   r   r1   rH   r2   r3   AnthropicResponseBlockrl   rm   rn   ra   r   r   r   r   ri   ri   Z   s    4[Bd
 T{D#*"T{D#*"dE3:#38;GT()D0>#DkKt) %dM3:++0;E!D(6r   ri   N)enumr   typingr   pydanticr   r   r   r   r   r   r&   r*   r/   r5   r>   rF   rV   rY   ro   r\   ra   ri   r   r   r   <module>rs      s      %C 
9 
D Di 
NI N
My M
i BI B

>y 
> 
Y 
 46TT 8) 8
EY E7	 7r   