o
    ØRWj  ã                   @  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   ún/home/esfera/Documents/content_generation/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  sN   |s	t d|›�ƒ‚ddi|pi ¥}| jtd|d�t||||ddi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)   Úbearer_authT©r%   r&   r'   r(   Úsecurity©ÚoptionsÚcast_to©Ú
ValueErrorÚ_getr
   r   r   Ú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	   rA   r   r   r   r   r      ó    	÷c                   @  r   )r   r   ÚAsyncContentWithRawResponsec                 C  r   r   )rH   r   r   r   r   r   S   r   zAsyncContent.with_raw_responseÚ!AsyncContentWithStreamingResponsec                 C  r   r!   )rI   r   r   r   r   r"   ]   r#   z$AsyncContent.with_streaming_responseNr$   r)   r*   r%   r+   r&   r,   r'   r-   r(   r.   r/   c             	   Ã  sV   �|s
t d|›�ƒ‚ddi|pi ¥}| jtd|d�t||||ddid�tjd	�I d
H S )r0   r1   r2   r3   r4   r5   r6   Tr7   r9   Nr<   r@   r   r   r   rA   f   s   €
û÷zAsyncContent.retrieve)r   rH   )r   rI   rB   rC   r   r   r   r   r   R   rG   c                   @  ó   e Zd Zddd„ZdS )	r   Úcontentr   r   ÚNonec                 C  ó   || _ t |j¡| _d S ©N)Ú_contentr   Úto_raw_response_wrapperrA   ©r   rK   r   r   r   Ú__init__Ž   ó   
ÿzContentWithRawResponse.__init__N©rK   r   r   rL   ©rD   rE   rF   rR   r   r   r   r   r   �   ó    r   c                   @  rJ   )	rH   rK   r   r   rL   c                 C  rM   rN   )rO   r   Úasync_to_raw_response_wrapperrA   rQ   r   r   r   rR   —   rS   z$AsyncContentWithRawResponse.__init__N©rK   r   r   rL   rU   r   r   r   r   rH   –   rV   rH   c                   @  rJ   )	r    rK   r   r   rL   c                 C  ó   || _ t|jtƒ| _d S rN   )rO   r   rA   r   rQ   r   r   r   rR       ó
   
þz%ContentWithStreamingResponse.__init__NrT   rU   r   r   r   r   r    Ÿ   rV   r    c                   @  rJ   )	rI   rK   r   r   rL   c                 C  rY   rN   )rO   r   rA   r   rQ   r   r   r   rR   ª   rZ   z*AsyncContentWithStreamingResponse.__init__NrX   rU   r   r   r   r   rI   ©   rV   rI   ) Ú
__future__r   ÚhttpxÚ r   Ú_typesr   r   r   r   r	   Ú_utilsr
   Ú_compatr   Ú	_resourcer   r   Ú	_responser   r   r   r   Ú_base_clientr   Ú__all__r   r   r   rH   r    rI   r   r   r   r   Ú<module>   s    ;;		
