
    g                         	 d dl Z d dlmZ d dlmZ d dlmZ	  G d de j                        Z
 G d d	e j                        Z G d
 de j                        Z G d de j                        Zy# e$ r	  ed      w xY w)    NzMPlease install the Anthropic SDK to use this feature: 'pip install anthropic')WrappedMessages)AsyncWrappedMessages)Clientc                   4     e Zd ZU dZeed<   def fdZ xZS )AnthropicBedrockj
    A wrapper around the Anthropic Bedrock SDK that automatically sends LLM usage events to PostHog.
    
_ph_clientposthog_clientc                 R    t        |   di | || _        t        |       | _        y N super__init__r	   r   messagesselfr
   kwargs	__class__s      ]/var/www/openai/venv/lib/python3.12/site-packages/posthog/ai/anthropic/anthropic_providers.pyr   zAnthropicBedrock.__init__   &    "6"('-    __name__
__module____qualname____doc__PostHogClient__annotations__r   __classcell__r   s   @r   r   r      !     .} . .r   r   c                   4     e Zd ZU dZeed<   def fdZ xZS )AsyncAnthropicBedrockr   r	   r
   c                 R    t        |   di | || _        t        |       | _        y r   r   r   r	   r   r   r   s      r   r   zAsyncAnthropicBedrock.__init__   &    "6"(,T2r   r   r!   s   @r   r$   r$      !     3} 3 3r   r$   c                   4     e Zd ZU dZeed<   def fdZ xZS )AnthropicVertexi
    A wrapper around the Anthropic Vertex SDK that automatically sends LLM usage events to PostHog.
    r	   r
   c                 R    t        |   di | || _        t        |       | _        y r   r   r   s      r   r   zAnthropicVertex.__init__,   r   r   r   r!   s   @r   r*   r*   %   r"   r   r*   c                   4     e Zd ZU dZeed<   def fdZ xZS )AsyncAnthropicVertexr+   r	   r
   c                 R    t        |   di | || _        t        |       | _        y r   r&   r   s      r   r   zAsyncAnthropicVertex.__init__9   r'   r   r   r!   s   @r   r.   r.   2   r(   r   r.   )	anthropicImportErrorModuleNotFoundErrorposthog.ai.anthropic.anthropicr   $posthog.ai.anthropic.anthropic_asyncr   posthog.clientr   r   r   r$   r*   r.   r   r   r   <module>r6      s   o ; E 2
.y11 
.
3I;; 
3
.i// 
.
3999 
3_  o
m
nnos   A- -A;