
    U th+                    N   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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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)	NOT_GIVENBodyQueryHeadersNotGiven)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)SyncPage	AsyncPage)Model)AsyncPaginatormake_request_options)ModelDeletedModelsAsyncModelsc                  z    e Zd Zedd            Zedd            ZdddedddZdddedddZdddedddZ	dS )r   returnModelsWithRawResponsec                     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    k/var/www/html/mycamper/aliexpress-site/backend/venv/lib/python3.11/site-packages/openai/resources/models.pywith_raw_responsezModels.with_raw_response   s     %T***    ModelsWithStreamingResponsec                     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Models.with_streaming_response"   s     +4000r!   Nextra_headersextra_query
extra_bodytimeoutmodelstrr'   Headers | Noner(   Query | Noner)   Body | Noner*   'float | httpx.Timeout | None | NotGivenr   c          	         |st          d|          |                     d| t          ||||          t                    S )  
        Retrieves a model instance, providing basic information about the model such as
        the owner and permissioning.

        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
        4Expected a non-empty value for `model` but received /models/r&   optionscast_to
ValueError_getr   r   r   r+   r'   r(   r)   r*   s         r   retrievezModels.retrieve+   sm    0  	_]TY]]^^^yyu(+Q[el     
 
 	
r!   SyncPage[Model]c          
         |                      dt          t                   t          ||||          t                    S z
        Lists the currently available models, and provides basic information about each
        one such as the owner and availability.
        z/modelsr&   )pager6   r+   )_get_api_listr   r   r   r   r'   r(   r)   r*   s        r   listzModels.listM   sM     !!%(+Q[el    " 
 
 	
r!   r   c          	         |st          d|          |                     d| t          ||||          t                    S )  Delete a fine-tuned model.

        You must have the Owner role in your organization to
        delete a model.

        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
        r3   r4   r&   r5   r9   _deleter   r   r;   s         r   deletezModels.deleted   sm    2  	_]TY]]^^^||u(+Q[el   !  
 
 	
r!   )r   r   )r   r"   r+   r,   r'   r-   r(   r.   r)   r/   r*   r0   r   r   )
r'   r-   r(   r.   r)   r/   r*   r0   r   r=   r+   r,   r'   r-   r(   r.   r)   r/   r*   r0   r   r   
__name__
__module____qualname__r   r    r%   r   r<   rC   rH    r!   r   r   r      s        + + + _+ 1 1 1 _1 )-$("&;D 
  
  
  
  
  
N )-$("&;D
 
 
 
 
 
: )-$("&;D!
 !
 !
 !
 !
 !
 !
 !
r!   c                  z    e Zd Zedd            Zedd            ZdddedddZdddedddZdddedddZ	dS )r   r   AsyncModelsWithRawResponsec                     t          |           S r   )rQ   r   s    r   r    zAsyncModels.with_raw_response   s     *$///r!    AsyncModelsWithStreamingResponsec                     t          |           S r$   )rS   r   s    r   r%   z#AsyncModels.with_streaming_response   s     0555r!   Nr&   r+   r,   r'   r-   r(   r.   r)   r/   r*   r0   r   c          	        K   |st          d|          |                     d| t          ||||          t                     d{V S )r2   r3   r4   r&   r5   Nr8   r;   s         r   r<   zAsyncModels.retrieve   s      0  	_]TY]]^^^YYu(+Q[el     
 
 
 
 
 
 
 
 	
r!   'AsyncPaginator[Model, AsyncPage[Model]]c          
         |                      dt          t                   t          ||||          t                    S r?   )rA   r   r   r   rB   s        r   rC   zAsyncModels.list   sN     !!5!(+Q[el    " 
 
 	
r!   r   c          	        K   |st          d|          |                     d| t          ||||          t                     d{V S )rE   r3   r4   r&   r5   NrF   r;   s         r   rH   zAsyncModels.delete   s      2  	_]TY]]^^^\\u(+Q[el   ! " 
 
 
 
 
 
 
 
 	
r!   )r   rQ   )r   rS   rI   )
r'   r-   r(   r.   r)   r/   r*   r0   r   rV   rJ   rK   rO   r!   r   r   r      s        0 0 0 _0 6 6 6 _6 )-$("&;D 
  
  
  
  
  
N )-$("&;D
 
 
 
 
 
: )-$("&;D!
 !
 !
 !
 !
 !
 !
 !
r!   c                      e Zd ZddZdS )r   modelsr   r   Nonec                    || _         t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        d S N)_modelsr   to_raw_response_wrapperr<   rC   rH   r   rZ   s     r   __init__zModelsWithRawResponse.__init__   s\    (@O
 
 %<K
 
	 '>M
 
r!   NrZ   r   r   r[   rL   rM   rN   ra   rO   r!   r   r   r      (        
 
 
 
 
 
r!   r   c                      e Zd ZddZdS )rQ   rZ   r   r   r[   c                    || _         t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        d S r]   )r^   r   async_to_raw_response_wrapperr<   rC   rH   r`   s     r   ra   z#AsyncModelsWithRawResponse.__init__	  s\    (FO
 
 %BK
 
	 'DM
 
r!   NrZ   r   r   r[   rc   rO   r!   r   rQ   rQ     rd   r!   rQ   c                      e Zd ZddZdS )r"   rZ   r   r   r[   c                    || _         t          |j                  | _        t          |j                  | _        t          |j                  | _        d S r]   )r^   r   r<   rC   rH   r`   s     r   ra   z$ModelsWithStreamingResponse.__init__  sS    4O
 
 1K
 
	 3M
 
r!   Nrb   rc   rO   r!   r   r"   r"     rd   r!   r"   c                      e Zd ZddZdS )rS   rZ   r   r   r[   c                    || _         t          |j                  | _        t          |j                  | _        t          |j                  | _        d S r]   )r^   r   r<   rC   rH   r`   s     r   ra   z)AsyncModelsWithStreamingResponse.__init__'  sS    :O
 
 7K
 
	 9M
 
r!   Nrh   rc   rO   r!   r   rS   rS   &  rd   r!   rS   )$
__future__r   httpx r   _typesr   r   r   r	   r
   _compatr   	_resourcer   r   	_responser   r   
paginationr   r   types.modelr   _base_clientr   r   types.model_deletedr   __all__r   r   r   rQ   r"   rS   rO   r!   r   <module>ry      s!   # " " " " "        > > > > > > > > > > > > > > % % % % % % 9 9 9 9 9 9 9 9 X X X X X X X X , , , , , , , ,              / . . . . .]
#n
 n
 n
 n
 n
_ n
 n
 n
bn
 n
 n
 n
 n
" n
 n
 n
b
 
 
 
 
 
 
 

 
 
 
 
 
 
 

 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
r!   