
    f j'                    F   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 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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)ModelModelDeleted)	NOT_GIVENBodyQueryHeadersNotGiven)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)SyncPage	AsyncPage)AsyncPaginatormake_request_options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 N)r   selfs    kC:\Users\Terasoftware\OneDrive\Desktop\faahhh\fyndo\fyndo\venv\Lib\site-packages\openai/resources/models.pywith_raw_responsezModels.with_raw_response   s    $T***    ModelsWithStreamingResponsec                     t          |           S r   )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%   )pager5   r*   )_get_api_listr   r   r   r   r&   r'   r(   r)   s        r   listzModels.listA   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
        r2   r3   r%   r4   r8   _deleter   r   r:   s         r   deletezModels.deleteX   sm    2  	_]TY]]^^^||u(+Q[el   !  
 
 	
r!   )r   r   )r   r"   r*   r+   r&   r,   r'   r-   r(   r.   r)   r/   r   r   )
r&   r,   r'   r-   r(   r.   r)   r/   r   r<   r*   r+   r&   r,   r'   r-   r(   r.   r)   r/   r   r   
__name__
__module____qualname__r   r    r$   r   r;   rB   rG    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   )rP   r   s    r   r    zAsyncModels.with_raw_response}   s    )$///r!    AsyncModelsWithStreamingResponsec                     t          |           S r   )rR   r   s    r   r$   z#AsyncModels.with_streaming_response   s    /555r!   Nr%   r*   r+   r&   r,   r'   r-   r(   r.   r)   r/   r   c          	        K   |st          d|          |                     d| t          ||||          t                     d{V S )r1   r2   r3   r%   r4   Nr7   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>   )r@   r   r   r   rA   s        r   rB   zAsyncModels.list   sN     !!5!(+Q[el    " 
 
 	
r!   r   c          	        K   |st          d|          |                     d| t          ||||          t                     d{V S )rD   r2   r3   r%   r4   NrE   r:   s         r   rG   zAsyncModels.delete   s      2  	_]TY]]^^^\\u(+Q[el   ! " 
 
 
 
 
 
 
 
 	
r!   )r   rP   )r   rR   rH   )
r&   r,   r'   r-   r(   r.   r)   r/   r   rU   rI   rJ   rN   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 r   )_modelsr   to_raw_response_wrapperr;   rB   rG   r   rY   s     r   __init__zModelsWithRawResponse.__init__   s\    (@O
 
 %<K
 
	 '>M
 
r!   NrY   r   r   rZ   rK   rL   rM   r_   rN   r!   r   r   r      (        
 
 
 
 
 
r!   r   c                      e Zd ZddZdS )rP   rY   r   r   rZ   c                    || _         t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        d S r   )r\   r   async_to_raw_response_wrapperr;   rB   rG   r^   s     r   r_   z#AsyncModelsWithRawResponse.__init__   s\    (FO
 
 %BK
 
	 'DM
 
r!   NrY   r   r   rZ   ra   rN   r!   r   rP   rP      rb   r!   rP   c                      e Zd ZddZdS )r"   rY   r   r   rZ   c                    || _         t          |j                  | _        t          |j                  | _        t          |j                  | _        d S r   )r\   r   r;   rB   rG   r^   s     r   r_   z$ModelsWithStreamingResponse.__init__  sS    4O
 
 1K
 
	 3M
 
r!   Nr`   ra   rN   r!   r   r"   r"      rb   r!   r"   c                      e Zd ZddZdS )rR   rY   r   r   rZ   c                    || _         t          |j                  | _        t          |j                  | _        t          |j                  | _        d S r   )r\   r   r;   rB   rG   r^   s     r   r_   z)AsyncModelsWithStreamingResponse.__init__  sS    :O
 
 7K
 
	 9M
 
r!   Nrf   ra   rN   r!   r   rR   rR     rb   r!   rR   )#
__future__r   httpx r   typesr   r   _typesr   r	   r
   r   r   _compatr   	_resourcer   r   	_responser   r   
paginationr   r   _base_clientr   r   __all__r   r   r   rP   r"   rR   rN   r!   r   <module>rv      s   # " " " " "        ' ' ' ' ' ' ' ' > > > > > > > > > > > > > > % % % % % % 9 9 9 9 9 9 9 9 X X X X X X X X , , , , , , , ,       
 ]
#c
 c
 c
 c
 c
_ c
 c
 c
Lc
 c
 c
 c
 c
" c
 c
 c
L
 
 
 
 
 
 
 

 
 
 
 
 
 
 

 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
r!   