o
    iW                     @  s   d dl mZ d dlZddlmZ ddlmZmZmZm	Z	m
Z
 ddlmZ 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 ddgZG dd deZG dd deZG dd dZG dd dZG dd dZG dd dZdS )    )annotationsN   )_legacy_response)BodyQueryHeadersNotGiven	not_given)path_template)cached_property)SyncAPIResourceAsyncAPIResource)StreamedBinaryAPIResponseAsyncStreamedBinaryAPIResponse#to_custom_streamed_response_wrapper)async_to_custom_streamed_response_wrapper)make_request_optionsContentAsyncContentc                   @  >   e Zd ZedddZedddZddded	dddZdS )r   returnContentWithRawResponsec                 C     t | S a  
        This property can be used as a prefix for any HTTP method call to return
        the raw response object instead of the parsed content.

        For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
        )r   self r   Y/home/kim/smarthome/.venv/lib/python3.10/site-packages/openai/resources/skills/content.pywith_raw_response      zContent.with_raw_responseContentWithStreamingResponsec                 C  r   z
        An alternative to `.with_raw_response` that doesn't eagerly read the response body.

        For more information, see https://www.github.com/openai/openai-python#with_streaming_response
        )r    r   r   r   r   with_streaming_response"      zContent.with_streaming_responseNextra_headersextra_query
extra_bodytimeoutskill_idstrr%   Headers | Noner&   Query | Noner'   Body | Noner(   'float | httpx.Timeout | None | NotGiven+_legacy_response.HttpxBinaryResponseContentc                C  sH   |s	t d|ddi|pi }| jtd|dt||||dtjdS )Z  
        Download a skill zip bundle by its ID.

        Args:
          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        7Expected a non-empty value for `skill_id` but received Acceptapplication/binary/skills/{skill_id}/contentr)   r$   optionsZcast_to
ValueError_getr
   r   r   ZHttpxBinaryResponseContentr   r)   r%   r&   r'   r(   r   r   r   retrieve+   s   
zContent.retrieve)r   r   )r   r    r)   r*   r%   r+   r&   r,   r'   r-   r(   r.   r   r/   __name__
__module____qualname__r   r   r"   r	   r<   r   r   r   r   r          	c                   @  r   )r   r   AsyncContentWithRawResponsec                 C  r   r   )rC   r   r   r   r   r   O   r   zAsyncContent.with_raw_response!AsyncContentWithStreamingResponsec                 C  r   r!   )rD   r   r   r   r   r"   Y   r#   z$AsyncContent.with_streaming_responseNr$   r)   r*   r%   r+   r&   r,   r'   r-   r(   r.   r/   c                  sP   |s
t d|ddi|pi }| jtd|dt||||dtjdI dH S )	r0   r1   r2   r3   r4   r5   r$   r6   Nr8   r;   r   r   r   r<   b   s   
zAsyncContent.retrieve)r   rC   )r   rD   r=   r>   r   r   r   r   r   N   rB   c                   @     e Zd ZdddZdS )	r   contentr   r   Nonec                 C     || _ t|j| _d S N)_contentr   Zto_raw_response_wrapperr<   r   rF   r   r   r   __init__      
zContentWithRawResponse.__init__NrF   r   r   rG   r?   r@   rA   rL   r   r   r   r   r          r   c                   @  rE   )	rC   rF   r   r   rG   c                 C  rH   rI   )rJ   r   Zasync_to_raw_response_wrapperr<   rK   r   r   r   rL      rM   z$AsyncContentWithRawResponse.__init__NrF   r   r   rG   rO   r   r   r   r   rC      rP   rC   c                   @  rE   )	r    rF   r   r   rG   c                 C     || _ t|jt| _d S rI   )rJ   r   r<   r   rK   r   r   r   rL      
   
z%ContentWithStreamingResponse.__init__NrN   rO   r   r   r   r   r       rP   r    c                   @  rE   )	rD   rF   r   r   rG   c                 C  rR   rI   )rJ   r   r<   r   rK   r   r   r   rL      rS   z*AsyncContentWithStreamingResponse.__init__NrQ   rO   r   r   r   r   rD      rP   rD   ) 
__future__r   Zhttpx r   _typesr   r   r   r   r	   Z_utilsr
   Z_compatr   Z	_resourcer   r   	_responser   r   r   r   Z_base_clientr   __all__r   r   r   rC   r    rD   r   r   r   r   <module>   s    77		
