o
    jCiL                     @  sl  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Z2G dd deZ3G dd deZ4G dd dZ5G dd dZ6G dd dZ7G dd dZ8dS )    )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d2ddZed3ddZed4d	d
Zeeedddedd5ddZ	ddded d6d#d$Z
eeeddded%d7d-d.Zddded d8d0d1ZdS )9r&   returnr   c                 C  
   t | jS N)r   _clientself r/   ~/var/www/html/fyndo/python/python_agents/rag_suite/venv/lib/python3.10/site-packages/openai/resources/containers/containers.pyfiles"      
zContainers.filesContainersWithRawResponsec                 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
        )r3   r-   r/   r/   r0   with_raw_response&      zContainers.with_raw_responseContainersWithStreamingResponsec                 C  r4   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
        )r8   r-   r/   r/   r0   with_streaming_response0      z"Containers.with_streaming_responseNexpires_afterfile_idsmemory_limitextra_headersextra_query
extra_bodytimeoutnamestrr=   +container_create_params.ExpiresAfter | Omitr>   SequenceNotStr[str] | Omitr?   (Literal['1g', '4g', '16g', '64g'] | Omitr@   Headers | NonerA   Query | NonerB   Body | NonerC   'float | httpx.Timeout | None | NotGivenr$   c          	   	   C  s0   | j dt||||dtjt||||dtdS )d  
        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".

          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rD   r=   r>   r?   r@   rA   rB   rC   bodyoptionscast_to)_postr   r   ContainerCreateParamsr"   r$   	r.   rD   r=   r>   r?   r@   rA   rB   rC   r/   r/   r0   create9   s   "	zContainers.createrP   container_idr%   c                C  s4   |s	t d|| jd| t||||dtd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/rP   rS   rT   
ValueError_getr"   r%   r.   rY   r@   rA   rB   rC   r/   r/   r0   retrievel   s   zContainers.retrieveafterlimitorderr@   rA   rB   rC   rd   
str | Omitre   
int | Omitrf   Literal['asc', 'desc'] | Omit%SyncCursorPage[ContainerListResponse]c                C  4   | j dtt t||||t|||dtjdtd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
        rN   )rd   re   rf   )r@   rA   rB   rC   query)pagerS   model)_get_api_listr   r#   r"   r   r   ContainerListParamsr.   rd   re   rf   r@   rA   rB   rC   r/   r/   r0   list   $   %zContainers.listNonec                C  sD   |s	t d|ddi|pi }| jd| t||||dtd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
        r[   Accept*/*r\   rP   r]   r_   _deleter"   r   ra   r/   r/   r0   delete   s   zContainers.delete)r)   r   )r)   r3   )r)   r8   rD   rE   r=   rF   r>   rG   r?   rH   r@   rI   rA   rJ   rB   rK   rC   rL   r)   r$   rY   rE   r@   rI   rA   rJ   rB   rK   rC   rL   r)   r%   )rd   rg   re   rh   rf   ri   r@   rI   rA   rJ   rB   rK   rC   rL   r)   rj   rY   rE   r@   rI   rA   rJ   rB   rK   rC   rL   r)   ru   __name__
__module____qualname__r   r1   r6   r:   r   r   rX   rb   rs   r{   r/   r/   r/   r0   r&   !   B    	9$?c                   @  r(   )9r'   r)   r   c                 C  r*   r+   )r   r,   r-   r/   r/   r0   r1      r2   zAsyncContainers.filesAsyncContainersWithRawResponsec                 C  r4   r5   )r   r-   r/   r/   r0   r6      r7   z!AsyncContainers.with_raw_response$AsyncContainersWithStreamingResponsec                 C  r4   r9   )r   r-   r/   r/   r0   r:      r;   z'AsyncContainers.with_streaming_responseNr<   rD   rE   r=   rF   r>   rG   r?   rH   r@   rI   rA   rJ   rB   rK   rC   rL   r$   c          	   	     s>   | j dt||||dtjI dH t||||dtdI dH S )rM   rN   rO   NrP   rQ   )rU   r   r   rV   r"   r$   rW   r/   r/   r0   rX     s    "	zAsyncContainers.createrP   rY   r%   c                  s<   |s
t d|| jd| t||||dtdI dH S )rZ   r[   r\   rP   r]   Nr^   ra   r/   r/   r0   rb   4  s   zAsyncContainers.retrieverc   rd   rg   re   rh   rf   ri   MAsyncPaginator[ContainerListResponse, AsyncCursorPage[ContainerListResponse]]c                C  rk   rl   )rp   r    r#   r"   r   r   rq   rr   r/   r/   r0   rs   U  rt   zAsyncContainers.listru   c                  sL   |s
t d|ddi|pi }| jd| t||||dtdI dH S )rv   r[   rw   rx   r\   rP   r]   Nry   ra   r/   r/   r0   r{     s   zAsyncContainers.delete)r)   r   )r)   r   )r)   r   r|   r}   )rd   rg   re   rh   rf   ri   r@   rI   rA   rJ   rB   rK   rC   rL   r)   r   r~   r   r/   r/   r/   r0   r'      r   c                   @  $   e Zd ZdddZeddd	Zd
S )r3   
containersr&   r)   ru   c                 C  B   || _ t|j| _t|j| _t|j| _t|j| _d S r+   )_containersr   to_raw_response_wrapperrX   rb   rs   r{   r.   r   r/   r/   r0   __init__     
z"ContainersWithRawResponse.__init__r   c                 C     t | jjS r+   )r   r   r1   r-   r/   r/   r0   r1        zContainersWithRawResponse.filesNr   r&   r)   ru   )r)   r   r   r   r   r   r   r1   r/   r/   r/   r0   r3         
r3   c                   @  r   )r   r   r'   r)   ru   c                 C  r   r+   )r   r   async_to_raw_response_wrapperrX   rb   rs   r{   r   r/   r/   r0   r     r   z'AsyncContainersWithRawResponse.__init__r   c                 C  r   r+   )r   r   r1   r-   r/   r/   r0   r1     r   z$AsyncContainersWithRawResponse.filesNr   r'   r)   ru   )r)   r   r   r/   r/   r/   r0   r     r   r   c                   @  r   )r8   r   r&   r)   ru   c                 C  :   || _ t|j| _t|j| _t|j| _t|j| _d S r+   )r   r   rX   rb   rs   r{   r   r/   r/   r0   r        
z(ContainersWithStreamingResponse.__init__r   c                 C  r   r+   )r   r   r1   r-   r/   r/   r0   r1     r   z%ContainersWithStreamingResponse.filesNr   )r)   r   r   r/   r/   r/   r0   r8     r   r8   c                   @  r   )r   r   r'   r)   ru   c                 C  r   r+   )r   r   rX   rb   rs   r{   r   r/   r/   r0   r     r   z-AsyncContainersWithStreamingResponse.__init__r   c                 C  r   r+   )r   r   r1   r-   r/   r/   r0   r1     r   z*AsyncContainersWithStreamingResponse.filesNr   )r)   r   r   r/   r/   r/   r0   r     r   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'   r3   r   r8   r   r/   r/   r/   r0   <module>   s2   ,  I I