
    i                    6   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e          Z G d de          Z G d d          Z G d d          Z G d d          Z G 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                  R    e Zd Zedd            Zedd            ZdddedddZdS )r   returnContentWithRawResponsec                     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   selfs    p/home/piyush/.hermes/hermes-agent/venv/lib/python3.11/site-packages/openai/resources/containers/files/content.pywith_raw_responsezContent.with_raw_response   s     &d+++    ContentWithStreamingResponsec                     t          |           S 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   s    r   with_streaming_responsezContent.with_streaming_response"   s     ,D111r   N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                   |st          d|          |st          d|          ddi|pi }|                     t          d||          t          ||||ddi	          t          j        
          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)   bearer_authTr%   r&   r'   r(   securityoptionscast_to
ValueError_getr   r   r   HttpxBinaryResponseContentr   r)   r+   r%   r&   r'   r(   s          r   retrievezContent.retrieve+   s    0  	mk[gkklll 	caV]aabbb!#7QM<ORQyyDS_ip   )+'%'.   %?  
 
 	
r   )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
   rD    r   r   r   r      s~        , , , _, 2 2 2 _2 )-$("&;D)
 )
 )
 )
 )
 )
 )
 )
r   c                  R    e Zd Zedd            Zedd            ZdddedddZdS )r   r   AsyncContentWithRawResponsec                     t          |           S r   )rL   r   s    r   r   zAsyncContent.with_raw_responseX   s     +4000r   !AsyncContentWithStreamingResponsec                     t          |           S r"   )rN   r   s    r   r#   z$AsyncContent.with_streaming_responseb   s     1666r   Nr$   r)   r*   r+   r%   r,   r&   r-   r'   r.   r(   r/   r0   c                  K   |st          d|          |st          d|          ddi|pi }|                     t          d||          t          ||||ddi	          t          j        
           d{V S )r2   r3   r4   r5   r6   r7   r8   r9   Tr:   r<   Nr?   rC   s          r   rD   zAsyncContent.retrievek   s      0  	mk[gkklll 	caV]aabbb!#7QM<ORQYYDS_ip   )+'%'.   %?  
 
 
 
 
 
 
 
 	
r   )r   rL   )r   rN   rE   rF   rJ   r   r   r   r   W   s~        1 1 1 _1 7 7 7 _7 )-$("&;D)
 )
 )
 )
 )
 )
 )
 )
r   c                      e Zd ZddZdS )r   contentr   r   Nonec                P    || _         t          j        |j                  | _        d S N)_contentr   to_raw_response_wrapperrD   r   rR   s     r   __init__zContentWithRawResponse.__init__   s'    (@
 
r   NrR   r   r   rS   rG   rH   rI   rY   rJ   r   r   r   r      (        
 
 
 
 
 
r   r   c                      e Zd ZddZdS )rL   rR   r   r   rS   c                P    || _         t          j        |j                  | _        d S rU   )rV   r   async_to_raw_response_wrapperrD   rX   s     r   rY   z$AsyncContentWithRawResponse.__init__   s'    (F
 
r   NrR   r   r   rS   r[   rJ   r   r   rL   rL      r\   r   rL   c                      e Zd ZddZdS )r    rR   r   r   rS   c                R    || _         t          |j        t                    | _        d S rU   )rV   r   rD   r   rX   s     r   rY   z%ContentWithStreamingResponse.__init__   s'    ;%
 
r   NrZ   r[   rJ   r   r   r    r       (        
 
 
 
 
 
r   r    c                      e Zd ZddZdS )rN   rR   r   r   rS   c                R    || _         t          |j        t                    | _        d S rU   )rV   r   rD   r   rX   s     r   rY   z*AsyncContentWithStreamingResponse.__init__   s'    A*
 
r   Nr`   r[   rJ   r   r   rN   rN      rc   r   rN   ) 
__future__r   httpx r   _typesr   r   r   r	   r
   _utilsr   _compatr   	_resourcer   r   	_responser   r   r   r   _base_clientr   __all__r   r   r   rL   r    rN   rJ   r   r   <module>rp      s   # " " " " "  ! ! ! ! ! ! @ @ @ @ @ @ @ @ @ @ @ @ @ @ $ $ $ $ $ $ ' ' ' ' ' ' ; ; ; ; ; ; ; ;            2 1 1 1 1 1n
%=
 =
 =
 =
 =
o =
 =
 =
@=
 =
 =
 =
 =
# =
 =
 =
@
 
 
 
 
 
 
 

 
 
 
 
 
 
 

 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
r   