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   úc/var/www/html/chatgpt/venv/lib/python3.10/site-packages/openai/resources/skills/versions/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ÚversionÚstrÚskill_idr%   úHeaders | Noner&   úQuery | Noner'   úBody | Noner(   ú(float | httpx2.Timeout | None | NotGivenú+_legacy_response.HttpxBinaryResponseContentc             	   C  sb   |s	t d|›�ƒ‚|st d|›�ƒ‚ddi|pi ¥}| jtd||d�t||||ddid	�tjd
�S )á†  
        Download a skill version zip bundle.

        Args:
          version: The skill version number.

          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 ú6Expected a non-empty value for `version` but received ÚAcceptúapplication/binaryú-/skills/{skill_id}/versions/{version}/content©r+   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   r   Úretrieve+   s    û÷zContent.retrieve)r   r   )r   r    ©r)   r*   r+   r*   r%   r,   r&   r-   r'   r.   r(   r/   r   r0   ©Ú__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   X   r   zAsyncContent.with_raw_responseÚ!AsyncContentWithStreamingResponsec                 C  r   r!   )rI   r   r   r   r   r"   b   r#   z$AsyncContent.with_streaming_responseNr$   r)   r*   r+   r%   r,   r&   r-   r'   r.   r(   r/   r0   c             	   Ã  sj   �|s
t d|›�ƒ‚|st d|›�ƒ‚ddi|pi ¥}| jtd||d�t||||ddid	�tjd
�I dH S )r1   r2   r3   r4   r5   r6   r7   r8   Tr9   r;   Nr=   r@   r   r   r   rA   k   s"   €û÷zAsyncContent.retrieve)r   rH   )r   rI   rB   rC   r   r   r   r   r   W   rG   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_wrapperrA   ©r   rK   r   r   r   Ú__init__˜   ó   
ÿzContentWithRawResponse.__init__N©rK   r   r   rL   ©rD   rE   rF   rQ   r   r   r   r   r   —   ó    r   c                   @  rJ   )	rH   rK   r   r   rL   c                 C  rM   rN   )rO   r   Zasync_to_raw_response_wrapperrA   rP   r   r   r   rQ   ¡   rR   z$AsyncContentWithRawResponse.__init__N©rK   r   r   rL   rT   r   r   r   r   rH       rU   rH   c                   @  rJ   )	r    rK   r   r   rL   c                 C  ó   || _ t|jtƒ| _d S rN   )rO   r   rA   r   rP   r   r   r   rQ   ª   ó
   
þz%ContentWithStreamingResponse.__init__NrS   rT   r   r   r   r   r    ©   rU   r    c                   @  rJ   )	rI   rK   r   r   rL   c                 C  rW   rN   )rO   r   rA   r   rP   r   r   r   rQ   ´   rX   z*AsyncContentWithStreamingResponse.__init__NrV   rT   r   r   r   r   rI   ³   rU   rI   ) Ú
__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   rH   r    rI   r   r   r   r   Ú<module>   s    @@		
