
    i1T                       d dl mZ 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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/m0Z0 ddl1m2Z2 ddl3m4Z4 ddgZ5 G d de          Z6 G d de          Z7 G d d          Z8 G d d          Z9 G d d          Z: G d d          Z;dS )     )annotations)Iterable)LiteralN   )_legacy_response)container_list_paramscontainer_create_params)	BodyOmitQueryHeadersNoneTypeNotGivenSequenceNotStromit	not_given)path_template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d0d            Zed1d            Zeeeeeddded		d2dZ	ddded d3d#Z
eeeeddded$d4d,Zddded d5d.ZdS )6r)   returnr   c                *    t          | j                  S N)r   _clientselfs    m/home/piyush/.hermes/hermes-agent/venv/lib/python3.11/site-packages/openai/resources/containers/containers.pyfileszContainers.files#   s    T\"""    ContainersWithRawResponsec                     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
        )r5   r0   s    r2   with_raw_responsezContainers.with_raw_response'   s     )...r4   ContainersWithStreamingResponsec                     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
        )r9   r0   s    r2   with_streaming_responsez"Containers.with_streaming_response1   s     /t444r4   N	expires_afterfile_idsmemory_limitnetwork_policyskillsextra_headersextra_query
extra_bodytimeoutnamestrr>   +container_create_params.ExpiresAfter | Omitr?   SequenceNotStr[str] | Omitr@   (Literal['1g', '4g', '16g', '64g'] | OmitrA   ,container_create_params.NetworkPolicy | OmitrB   .Iterable[container_create_params.Skill] | OmitrC   Headers | NonerD   Query | NonerE   Body | NonerF   'float | httpx.Timeout | None | NotGivenr'   c       
            |                      dt          ||||||dt          j                  t	          |||	|
ddi          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.

          memory_limit: Optional memory limit for the container. Defaults to "1g".

          network_policy: Network access policy for the container.

          skills: An optional list of skills referenced by id or inline data.

          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rG   r>   r?   r@   rA   rB   bearer_authTrC   rD   rE   rF   securitybodyoptionscast_to)_postr   r	   ContainerCreateParamsr%   r'   r1   rG   r>   r?   r@   rA   rB   rC   rD   rE   rF   s              r2   createzContainers.create:   s    P zz  %2 ($0&4$  (=
 
 )+'%'.   ,)  
 
 	
r4   rC   rD   rE   rF   container_idr(   c                   |st          d|          |                     t          d|          t          ||||ddi          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/{container_id}rb   rV   TrW   r[   r\   
ValueError_getr   r%   r(   r1   rb   rC   rD   rE   rF   s         r2   retrievezContainers.retrievey   s|    .  	mk[gkklllyy6\RRR(+'%'.   .  

 

 
	
r4   afterlimitrG   orderrC   rD   rE   rF   ro   
str | Omitrp   
int | Omitrq   Literal['asc', 'desc'] | Omit%SyncCursorPage[ContainerListResponse]c                   |                      dt          t                   t          ||||t	          ||||dt
          j                  ddi          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.

          name: Filter results by container name.

          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
        rT   )ro   rp   rG   rq   rV   T)rC   rD   rE   rF   queryrX   )pager[   model)_get_api_listr"   r&   r%   r   r   ContainerListParams	r1   ro   rp   rG   rq   rC   rD   rE   rF   s	            r2   listzContainers.list   s    P !! 56(+'%%!&!& $!&	  *=  (.    (' " 
 
 	
r4   Nonec                   |st          d|          ddi|pi }|                     t          d|          t          ||||ddi          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
        re   Accept*/*rf   rg   rV   TrW   rh   rj   _deleter   r%   r   rl   s         r2   deletezContainers.delete   s    .  	mk[gkklll!5B]-@bB||6\RRR(+'%'.     

 

 
	
r4   )r,   r   )r,   r5   )r,   r9   rG   rH   r>   rI   r?   rJ   r@   rK   rA   rL   rB   rM   rC   rN   rD   rO   rE   rP   rF   rQ   r,   r'   rb   rH   rC   rN   rD   rO   rE   rP   rF   rQ   r,   r(   )ro   rr   rp   rs   rG   rr   rq   rt   rC   rN   rD   rO   rE   rP   rF   rQ   r,   ru   rb   rH   rC   rN   rD   rO   rE   rP   rF   rQ   r,   r   __name__
__module____qualname__r   r3   r8   r<   r   r   r`   rm   r~   r    r4   r2   r)   r)   "   sF       # # # _# / / / _/ 5 5 5 _5 FJ/3AEGKAE )-$("&;D=
 =
 =
 =
 =
 =
J )-$("&;D#
 #
 #
 #
 #
 #
P ! /3 )-$("&;D<
 <
 <
 <
 <
 <
H )-$("&;D$
 $
 $
 $
 $
 $
 $
 $
r4   c            
          e Zd Zed/d            Zed0d            Zed1d            Zeeeeeddded		d2dZ	ddded d3d#Z
eeeeddded$d4d,Zddded d5d.ZdS )6r*   r,   r   c                *    t          | j                  S r.   )r   r/   r0   s    r2   r3   zAsyncContainers.files  s    $,'''r4   AsyncContainersWithRawResponsec                     t          |           S r7   )r   r0   s    r2   r8   z!AsyncContainers.with_raw_response  s     .d333r4   $AsyncContainersWithStreamingResponsec                     t          |           S r;   )r   r0   s    r2   r<   z'AsyncContainers.with_streaming_response  s     4D999r4   Nr=   rG   rH   r>   rI   r?   rJ   r@   rK   rA   rL   rB   rM   rC   rN   rD   rO   rE   rP   rF   rQ   r'   c       
           K   |                      dt          ||||||dt          j                   d{V t	          |||	|
ddi          t
                     d{V S )rS   rT   rU   NrV   TrW   rY   )r]   r   r	   r^   r%   r'   r_   s              r2   r`   zAsyncContainers.create  s      P ZZ, %2 ($0&4$  (=
 
 
 
 
 
 
 
 )+'%'.   ,)   
 
 
 
 
 
 
 
 	
r4   ra   rb   r(   c                  K   |st          d|          |                     t          d|          t          ||||ddi          t                     d{V S )	rd   re   rf   rg   rV   TrW   rh   Nri   rl   s         r2   rm   zAsyncContainers.retrieveZ  s      .  	mk[gkklllYY6\RRR(+'%'.   .  

 

 

 

 

 

 

 

 
	
r4   rn   ro   rr   rp   rs   rq   rt   MAsyncPaginator[ContainerListResponse, AsyncCursorPage[ContainerListResponse]]c                   |                      dt          t                   t          ||||t	          ||||dt
          j                  ddi          t                    S rw   )r{   r#   r&   r%   r   r   r|   r}   s	            r2   r~   zAsyncContainers.list  s    P !! !67(+'%%!&!& $!&	  *=  (.    (' " 
 
 	
r4   r   c                  K   |st          d|          ddi|pi }|                     t          d|          t          ||||ddi          t          	           d
{V S )r   re   r   r   rf   rg   rV   TrW   rh   Nr   rl   s         r2   r   zAsyncContainers.delete  s      .  	mk[gkklll!5B]-@bB\\6\RRR(+'%'.    " 

 

 

 

 

 

 

 

 
	
r4   )r,   r   )r,   r   )r,   r   r   r   )ro   rr   rp   rs   rG   rr   rq   rt   rC   rN   rD   rO   rE   rP   rF   rQ   r,   r   r   r   r   r4   r2   r*   r*     sF       ( ( ( _( 4 4 4 _4 : : : _: FJ/3AEGKAE )-$("&;D=
 =
 =
 =
 =
 =
J )-$("&;D#
 #
 #
 #
 #
 #
P ! /3 )-$("&;D<
 <
 <
 <
 <
 <
H )-$("&;D$
 $
 $
 $
 $
 $
 $
 $
r4   c                  .    e Zd Zd	dZed
d            ZdS )r5   
containersr)   r,   r   c                   || _         t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        d S r.   )_containersr   to_raw_response_wrapperr`   rm   r~   r   r1   r   s     r2   __init__z"ContainersWithRawResponse.__init__  s{    %&>
 
 )@
 
 %<O
 
	 '>
 
r4   r   c                4    t          | j        j                  S r.   )r   r   r3   r0   s    r2   r3   zContainersWithRawResponse.files  s    #D$4$:;;;r4   Nr   r)   r,   r   )r,   r   r   r   r   r   r   r3   r   r4   r2   r5   r5     sH        
 
 
 
  < < < _< < <r4   r5   c                  .    e Zd Zd	dZed
d            ZdS )r   r   r*   r,   r   c                   || _         t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        d S r.   )r   r   async_to_raw_response_wrapperr`   rm   r~   r   r   s     r2   r   z'AsyncContainersWithRawResponse.__init__  s{    %&D
 
 )F
 
 %BO
 
	 'D
 
r4   r   c                4    t          | j        j                  S r.   )r   r   r3   r0   s    r2   r3   z$AsyncContainersWithRawResponse.files  s    ()9)?@@@r4   Nr   r*   r,   r   )r,   r   r   r   r4   r2   r   r     sN        
 
 
 
  A A A _A A Ar4   r   c                  .    e Zd Zd	dZed
d            ZdS )r9   r   r)   r,   r   c                    || _         t          |j                  | _        t          |j                  | _        t          |j                  | _        t          |j                  | _        d S r.   )r   r   r`   rm   r~   r   r   s     r2   r   z(ContainersWithStreamingResponse.__init__  so    %2
 
 5
 
 1O
 
	 3
 
r4   r    c                4    t          | j        j                  S r.   )r    r   r3   r0   s    r2   r3   z%ContainersWithStreamingResponse.files!  s    )$*:*@AAAr4   Nr   )r,   r    r   r   r4   r2   r9   r9     sN        
 
 
 
  B B B _B B Br4   r9   c                  .    e Zd Zd	dZed
d            ZdS )r   r   r*   r,   r   c                    || _         t          |j                  | _        t          |j                  | _        t          |j                  | _        t          |j                  | _        d S r.   )r   r   r`   rm   r~   r   r   s     r2   r   z-AsyncContainersWithStreamingResponse.__init__'  so    %8
 
 ;
 
 7O
 
	 9
 
r4   r!   c                4    t          | j        j                  S r.   )r!   r   r3   r0   s    r2   r3   z*AsyncContainersWithStreamingResponse.files7  s    .t/?/EFFFr4   Nr   )r,   r!   r   r   r4   r2   r   r   &  sN        
 
 
 
  G G G _G G Gr4   r   )<
__future__r   typingr   typing_extensionsr   httpx r   typesr   r	   _typesr
   r   r   r   r   r   r   r   r   _utilsr   r   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*   r5   r   r9   r   r   r4   r2   <module>r      s    # " " " " "       % % % % % %              C C C C C C C C e e e e e e e e e e e e e e e e e e e e e e K K K K K K K K K K & & & & & & : : : : : : : : Y Y Y Y Y Y Y Y                : 9 9 9 9 9 9 9 @ @ @ @ @ @ @ @ B B B B B B F F F F F F J J J J J J*
+^
 ^
 ^
 ^
 ^
 ^
 ^
 ^
B^
 ^
 ^
 ^
 ^
& ^
 ^
 ^
B< < < < < < < <,A A A A A A A A,B B B B B B B B,G G G G G G G G G Gr4   