o
    ¨Ýj  ã                   @  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   úZ/var/www/html/chatgpt/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 | httpx2.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©Ú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   )rF   r   r   r   r   r   S   r   zAsyncContent.with_raw_responseÚ!AsyncContentWithStreamingResponsec                 C  r   r!   )rG   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   r?   f   s   €
û÷zAsyncContent.retrieve)r   rF   )r   rG   r@   rA   r   r   r   r   r   R   rE   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   rI   r   r   r   Ú__init__Ž   ó   
ÿzContentWithRawResponse.__init__N©rI   r   r   rJ   ©rB   rC   rD   rO   r   r   r   r   r   �   ó    r   c                   @  rH   )	rF   rI   r   r   rJ   c                 C  rK   rL   )rM   r   Zasync_to_raw_response_wrapperr?   rN   r   r   r   rO   —   rP   z$AsyncContentWithRawResponse.__init__N©rI   r   r   rJ   rR   r   r   r   r   rF   –   rS   rF   c                   @  rH   )	r    rI   r   r   rJ   c                 C  ó   || _ t|jtƒ| _d S rL   )rM   r   r?   r   rN   r   r   r   rO       ó
   
þz%ContentWithStreamingResponse.__init__NrQ   rR   r   r   r   r   r    Ÿ   rS   r    c                   @  rH   )	rG   rI   r   r   rJ   c                 C  rU   rL   )rM   r   r?   r   rN   r   r   r   rO   ª   rV   z*AsyncContentWithStreamingResponse.__init__NrT   rR   r   r   r   r   rG   ©   rS   rG   ) Ú
__future__r   Zhttpx2Ú r   Ú_typesr   r   r   r   r	   Z_utilsr
   Z_compatr   Z	_resourcer   r   Ú	_responser   r   r   r   Z_base_clientr   Ú__all__r   r   r   rF   r    rG   r   r   r   r   Ú<module>   s    ;;		
