
    .h(K                       d dl mZ d dlmZ d dlZddlmZ ddlmZm	Z	 ddl
mZmZmZmZmZmZmZmZmZ ddlmZmZ dd	lmZ dd
lmZmZ ddlmZmZ ddlm Z m!Z!m"Z"m#Z#m$Z$m%Z% ddl&m'Z'm(Z( ddl)m*Z*m+Z+ ddl,m-Z- ddl.m/Z/ ddl0m1Z1 ddgZ2 G d de      Z3 G d de      Z4 G d d      Z5 G d d      Z6 G d d      Z7 G d d      Z8y)    )annotations)LiteralN   )_legacy_response)container_list_paramscontainer_create_params)	BodyOmitQueryHeadersNoneTypeNotGivenSequenceNotStromit	not_given)maybe_transformasync_maybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper   )Files
AsyncFilesFilesWithRawResponseAsyncFilesWithRawResponseFilesWithStreamingResponseAsyncFilesWithStreamingResponse)SyncCursorPageAsyncCursorPage)AsyncPaginatormake_request_options)ContainerListResponse)ContainerCreateResponse)ContainerRetrieveResponse
ContainersAsyncContainersc                     e Zd Zedd       Zedd       Zedd       Zeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ	ddded	 	 	 	 	 	 	 	 	 	 	 ddZ
eeeddded		 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd
Zddded	 	 	 	 	 	 	 	 	 	 	 ddZy)r'   c                ,    t        | j                        S N)r   _clientselfs    g/var/www/html/axiom-chatbot/venv/lib/python3.12/site-packages/openai/resources/containers/containers.pyfileszContainers.files"   s    T\\""    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
        )ContainersWithRawResponser-   s    r/   with_raw_responsezContainers.with_raw_response&   s     )..r1   c                    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
        )ContainersWithStreamingResponser-   s    r/   with_streaming_responsez"Containers.with_streaming_response0   s     /t44r1   Nexpires_afterfile_idsextra_headersextra_query
extra_bodytimeoutc          
         | j                  dt        |||dt        j                        t	        ||||      t
              S )  
        Create Container

        Args:
          name: Name of the container to create.

          expires_after: Container expiration time in seconds relative to the 'anchor' time.

          file_ids: IDs of files to copy to the container.

          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
        /containersnamer;   r<   r=   r>   r?   r@   bodyoptionscast_to)_postr   r   ContainerCreateParamsr#   r%   r.   rE   r;   r<   r=   r>   r?   r@   s           r/   createzContainers.create9   sX    > zz  %2 (
 (== )+Q[el ,  
 	
r1   rF   c          	     r    |st        d|      | j                  d| t        ||||      t              S )F  
        Retrieve Container

        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 /containers/rF   rI   rJ   
ValueError_getr#   r&   r.   container_idr=   r>   r?   r@   s         r/   retrievezContainers.retrieveh   sT    . Z[gZjkllyy<.)(+Q[el .  
 	
r1   afterlimitorderr=   r>   r?   r@   c                   | j                  dt        t           t        ||||t	        |||dt
        j                              t              S a  List Containers

        Args:
          after: A cursor for use in pagination.

        `after` is an object ID that defines your place
              in the list. For instance, if you make a list request and receive 100 objects,
              ending with obj_foo, your subsequent call can include after=obj_foo in order to
              fetch the next page of the list.

          limit: A limit on the number of objects to be returned. Limit can range between 1 and
              100, and the default is 20.

          order: Sort order by the `created_at` timestamp of the objects. `asc` for ascending
              order and `desc` for descending order.

          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
        rC   )r[   r\   r]   )r=   r>   r?   r@   query)pagerI   model)_get_api_listr    r$   r#   r   r   ContainerListParamsr.   r[   r\   r]   r=   r>   r?   r@   s           r/   listzContainers.list   sc    J !! 56(+'%%!&!&!&
 *== (# " 
 	
r1   c          	         |st        d|      ddi|xs i }| j                  d| t        ||||      t              S )D  
        Delete Container

        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
        rQ   Accept*/*rR   rF   rS   rU   _deleter#   r   rW   s         r/   deletezContainers.delete   sh    . Z[gZjkll!5B]-@bB||<.)(+Q[el   
 	
r1   )returnr   )rn   r4   )rn   r8   rE   strr;   z+container_create_params.ExpiresAfter | Omitr<   zSequenceNotStr[str] | Omitr=   Headers | Noner>   Query | Noner?   Body | Noner@   'float | httpx.Timeout | None | NotGivenrn   r%   rX   rp   r=   rq   r>   rr   r?   rs   r@   rt   rn   r&   )r[   
str | Omitr\   
int | Omitr]   Literal['asc', 'desc'] | Omitr=   rq   r>   rr   r?   rs   r@   rt   rn   z%SyncCursorPage[ContainerListResponse]rX   rp   r=   rq   r>   rr   r?   rs   r@   rt   rn   None__name__
__module____qualname__r   r0   r5   r9   r   r   rN   rY   rf   rm    r1   r/   r'   r'   !   s   # # / / 5 5 FJ/3 )-$("&;D-
 -
 C	-

 --
 &-
 "-
  -
 9-
 
!-
j )-$("&;D

 &
 "
  
 9
 
#
H ! /3 )-$("&;D7
 7
 	7

 -7
 &7
 "7
  7
 97
 
/7
~ )-$("&;D 
 
 & 
 " 
   
 9 
 
 
r1   c                     e Zd Zedd       Zedd       Zedd       Zeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ	ddded	 	 	 	 	 	 	 	 	 	 	 ddZ
eeeddded		 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd
Zddded	 	 	 	 	 	 	 	 	 	 	 ddZy)r(   c                ,    t        | j                        S r+   )r   r,   r-   s    r/   r0   zAsyncContainers.files   s    $,,''r1   c                    t        |       S r3   )AsyncContainersWithRawResponser-   s    r/   r5   z!AsyncContainers.with_raw_response   s     .d33r1   c                    t        |       S r7   )$AsyncContainersWithStreamingResponser-   s    r/   r9   z'AsyncContainers.with_streaming_response   s     4D99r1   Nr:   c          
        K   | j                  dt        |||dt        j                         d{   t	        ||||      t
               d{   S 7 $7 w)rB   rC   rD   NrF   rG   )rK   r   r   rL   r#   r%   rM   s           r/   rN   zAsyncContainers.create   sq     > ZZ, %2 (
 (==  )+Q[el ,   
 
 	

s!   .AA
AAAArF   c          	        K   |st        d|      | j                  d| t        ||||      t               d{   S 7 w)rP   rQ   rR   rF   rS   NrT   rW   s         r/   rY   zAsyncContainers.retrieve,  sb     . Z[gZjkllYY<.)(+Q[el .  
 
 	
 
s   <AAArZ   c                   | j                  dt        t           t        ||||t	        |||dt
        j                              t              S r_   )rc   r!   r$   r#   r   r   rd   re   s           r/   rf   zAsyncContainers.listM  sc    J !! !67(+'%%!&!&!&
 *== (# " 
 	
r1   c          	        K   |st        d|      ddi|xs i }| j                  d| t        ||||      t               d{   S 7 w)rh   rQ   ri   rj   rR   rF   rS   Nrk   rW   s         r/   rm   zAsyncContainers.delete  sv     . Z[gZjkll!5B]-@bB\\<.)(+Q[el  " 
 
 	
 
s   AAA	A)rn   r   )rn   r   )rn   r   ro   ru   )r[   rv   r\   rw   r]   rx   r=   rq   r>   rr   r?   rs   r@   rt   rn   zMAsyncPaginator[ContainerListResponse, AsyncCursorPage[ContainerListResponse]]ry   r{   r   r1   r/   r(   r(      s   ( ( 4 4 : : FJ/3 )-$("&;D-
 -
 C	-

 --
 &-
 "-
  -
 9-
 
!-
j )-$("&;D

 &
 "
  
 9
 
#
H ! /3 )-$("&;D7
 7
 	7

 -7
 &7
 "7
  7
 97
 
W7
~ )-$("&;D 
 
 & 
 " 
   
 9 
 
 
r1   c                  &    e Zd ZddZedd       Zy)r4   c                2   || _         t        j                  |j                        | _        t        j                  |j                        | _        t        j                  |j
                        | _        t        j                  |j                        | _        y r+   )_containersr   to_raw_response_wrapperrN   rY   rf   rm   r.   
containerss     r/   __init__z"ContainersWithRawResponse.__init__  sz    %&>>
 )@@
 %<<OO
	 '>>
r1   c                @    t        | j                  j                        S r+   )r   r   r0   r-   s    r/   r0   zContainersWithRawResponse.files  s    #D$4$4$:$:;;r1   Nr   r'   rn   rz   )rn   r   r|   r}   r~   r   r   r0   r   r1   r/   r4   r4     s    
  < <r1   r4   c                  &    e Zd ZddZedd       Zy)r   c                2   || _         t        j                  |j                        | _        t        j                  |j                        | _        t        j                  |j
                        | _        t        j                  |j                        | _        y r+   )r   r   async_to_raw_response_wrapperrN   rY   rf   rm   r   s     r/   r   z'AsyncContainersWithRawResponse.__init__  sz    %&DD
 )FF
 %BBOO
	 'DD
r1   c                @    t        | j                  j                        S r+   )r   r   r0   r-   s    r/   r0   z$AsyncContainersWithRawResponse.files  s    ()9)9)?)?@@r1   Nr   r(   rn   rz   )rn   r   r   r   r1   r/   r   r     s    
  A Ar1   r   c                  &    e Zd ZddZedd       Zy)r8   c                    || _         t        |j                        | _        t        |j                        | _        t        |j                        | _        t        |j
                        | _        y r+   )r   r   rN   rY   rf   rm   r   s     r/   r   z(ContainersWithStreamingResponse.__init__  sb    %2
 5
 1OO
	 3
r1   c                @    t        | j                  j                        S r+   )r   r   r0   r-   s    r/   r0   z%ContainersWithStreamingResponse.files  s    )$*:*:*@*@AAr1   Nr   )rn   r   r   r   r1   r/   r8   r8     s    
  B Br1   r8   c                  &    e Zd ZddZedd       Zy)r   c                    || _         t        |j                        | _        t        |j                        | _        t        |j                        | _        t        |j
                        | _        y r+   )r   r   rN   rY   rf   rm   r   s     r/   r   z-AsyncContainersWithStreamingResponse.__init__  sb    %8
 ;
 7OO
	 9
r1   c                @    t        | j                  j                        S r+   )r   r   r0   r-   s    r/   r0   z*AsyncContainersWithStreamingResponse.files  s    .t/?/?/E/EFFr1   Nr   )rn   r   r   r   r1   r/   r   r     s    
  G Gr1   r   )9
__future__r   typing_extensionsr   httpx r   typesr   r   _typesr	   r
   r   r   r   r   r   r   r   _utilsr   r   _compatr   	_resourcer   r   	_responser   r   files.filesr   r   r   r   r   r   
paginationr    r!   _base_clientr"   r#   types.container_list_responser$   types.container_create_responser%   !types.container_retrieve_responser&   __all__r'   r(   r4   r   r8   r   r   r1   r/   <module>r      s    # %    C e e e < & : Y  : @ B F J*
+A
 A
HA
& A
H< <,A A,B B,G Gr1   