o
    i0                     @  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/home/kim/smarthome/.venv/lib/python3.10/site-packages/openai/resources/containers/files/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file_idstrcontainer_idr%   Headers | Noner&   Query | Noner'   Body | Noner(   'float | httpx.Timeout | None | NotGiven+_legacy_response.HttpxBinaryResponseContentc                C  s\   |s	t d||st d|ddi|pi }| jtd||dt||||dtjdS )	S  
        Retrieve Container File Content

        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
        ;Expected a non-empty value for `container_id` but received 6Expected a non-empty value for `file_id` but received Acceptapplication/binary2/containers/{container_id}/files/{file_id}/contentr+   r)   r$   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	   r>   r   r   r   r   r          	c                   @  r   )r   r   AsyncContentWithRawResponsec                 C  r   r   )rE   r   r   r   r   r   T   r   zAsyncContent.with_raw_response!AsyncContentWithStreamingResponsec                 C  r   r!   )rF   r   r   r   r   r"   ^   r#   z$AsyncContent.with_streaming_responseNr$   r)   r*   r+   r%   r,   r&   r-   r'   r.   r(   r/   r0   c                  sd   |s
t d||st d|ddi|pi }| jtd||dt||||dtjdI d	H S )
r1   r2   r3   r4   r5   r6   r7   r$   r8   Nr:   r=   r   r   r   r>   g   s   zAsyncContent.retrieve)r   rE   )r   rF   r?   r@   r   r   r   r   r   S   rD   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   rH   r   r   r   __init__      
zContentWithRawResponse.__init__NrH   r   r   rI   rA   rB   rC   rN   r   r   r   r   r          r   c                   @  rG   )	rE   rH   r   r   rI   c                 C  rJ   rK   )rL   r   Zasync_to_raw_response_wrapperr>   rM   r   r   r   rN      rO   z$AsyncContentWithRawResponse.__init__NrH   r   r   rI   rQ   r   r   r   r   rE      rR   rE   c                   @  rG   )	r    rH   r   r   rI   c                 C     || _ t|jt| _d S rK   )rL   r   r>   r   rM   r   r   r   rN      
   
z%ContentWithStreamingResponse.__init__NrP   rQ   r   r   r   r   r       rR   r    c                   @  rG   )	rF   rH   r   r   rI   c                 C  rT   rK   )rL   r   r>   r   rM   r   r   r   rN      rU   z*AsyncContentWithStreamingResponse.__init__NrS   rQ   r   r   r   r   rF      rR   rF   ) 
__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   rE   r    rF   r   r   r   r   <module>   s    <<		
