
    gn                    r    d dl mZ d dlmZmZ d dlmZmZmZm	Z	 d dl
mZ  ed      Z G d dee   e      Zy)	    )annotations)ABCabstractmethod)GenericTypeVarIterablecast)overrideTc                      e Zd ZdZddZedd       Zedd       Zedd       Ze	edd              Z
ddZddZedd	       Zy
)	LazyProxyzImplements data methods to pretend that an instance is another instance.

    This includes forwarding attribute access and other methods.
    c                ^    | j                         }t        |t              r|S t        ||      S N)__get_proxied__
isinstancer   getattr)selfattrproxieds      I/var/www/openai/venv/lib/python3.12/site-packages/openai/_utils/_proxy.py__getattr__zLazyProxy.__getattr__   s,    &&(gy)Nw%%    c                    | j                         }t        |t              r|j                  j                  S t        | j                               S r   )r   r   r   	__class____name__reprr   r   s     r   __repr__zLazyProxy.__repr__   s@    &&(gy)$$---D((*++r   c                    | j                         }t        |t              r|j                  j                  S t        |      S r   )r   r   r   r   r   strr   s     r   __str__zLazyProxy.__str__    s6    &&(gy)$$---7|r   c                f    | j                         }t        |t              rg S |j                         S r   )r   r   r   __dir__r   s     r   r#   zLazyProxy.__dir__'   s,    &&(gy)I  r   c                    | j                         }t        t        |      t              rt        |      S |j                  S r   )r   
issubclasstyper   r   r   s     r   r   zLazyProxy.__class__.   s6     &&(d7mY/=    r   c                "    | j                         S r   )__load__r   s    r   r   zLazyProxy.__get_proxied__6   s    }}r   c                "    t        t        |       S )zHHelper method that returns the current proxy, typed as the loaded object)r	   r   r)   s    r   __as_proxied__zLazyProxy.__as_proxied__9   s    At}r   c                     y r    r)   s    r   r(   zLazyProxy.__load__=   s     r   N)r   r    returnobject)r.   r    )r.   zIterable[str])r.   r&   )r.   r   )r   
__module____qualname____doc__r   r
   r   r!   r#   propertyr   r   r+   r   r(   r-   r   r   r   r   
   s~    & , ,   ! ! !  !    r   r   N)
__future__r   abcr   r   typingr   r   r   r	   typing_extensionsr
   r   r   r-   r   r   <module>r8      s/    " # 3 3 &CL4!
C 4!r   