
    jA/                    4   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 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%y)    )annotationsN   )_legacy_response)BodyQueryHeadersNotGiven	not_given)path_template)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)SyncPage	AsyncPage)Model)AsyncPaginatormake_request_options)ModelDeletedModelsAsyncModelsc                      e Zd 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
y)r   :List and describe the various models available in the API.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
        )ModelsWithRawResponseselfs    v/var/www/internaltesting/Shamanth/prverification/HIS_auto/venv/lib/python3.12/site-packages/openai/resources/models.pywith_raw_responsezModels.with_raw_response   s     %T**    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
        )ModelsWithStreamingResponser   s    r    with_streaming_responsezModels.with_streaming_response%   s     +400r"   Nextra_headersextra_query
extra_bodytimeoutc                   |st        d|      | j                  t        d|      t        ||||ddi      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/{model}modelbearer_authTr(   r)   r*   r+   securityoptionscast_to
ValueError_getr   r   r   r   r1   r(   r)   r*   r+   s         r    retrievezModels.retrieve.   s^    0 STYS\]^^yy+59(+'%'.   

 
	
r"   c               j    | j                  dt        t           t        ||||ddi      t              S z
        Lists the currently available models, and provides basic information about each
        one such as the owner and availability.
        z/modelsr2   Tr3   )pager6   r1   )_get_api_listr   r   r   r   r(   r)   r*   r+   s        r    listzModels.listT   sG     !!%(+'%'.  " 
 	
r"   c                   |st        d|      | j                  t        d|      t        ||||ddi      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
        r.   r/   r0   r2   Tr3   r5   r9   _deleter   r   r   r;   s         r    deletezModels.deleteo   s^    2 STYS\]^^||+59(+'%'. !  

 
	
r"   )returnr   )rH   r%   r1   strr(   Headers | Noner)   Query | Noner*   Body | Noner+   'float | httpx.Timeout | None | NotGivenrH   r   )
r(   rK   r)   rL   r*   rM   r+   rN   rH   zSyncPage[Model]r1   rJ   r(   rK   r)   rL   r*   rM   r+   rN   rH   r   __name__
__module____qualname____doc__r   r!   r&   r
   r<   rB   rG    r"   r    r   r      s   D+ + 1 1 )-$("&;D$
$
 &$
 "$
  $
 9$
 
$
V )-$("&;D

 &
 "
  
 9
 

B )-$("&;D%
%
 &%
 "%
  %
 9%
 
%
r"   c                      e Zd 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
y)r   r   c                    t        |       S r   )AsyncModelsWithRawResponser   s    r    r!   zAsyncModels.with_raw_response   s     *$//r"   c                    t        |       S r$   ) AsyncModelsWithStreamingResponser   s    r    r&   z#AsyncModels.with_streaming_response   s     055r"   Nr'   c                  K   |st        d|      | j                  t        d|      t        ||||ddi      t               d{   S 7 w)	r-   r.   r/   r0   r2   Tr3   r5   Nr8   r;   s         r    r<   zAsyncModels.retrieve   sl     0 STYS\]^^YY+59(+'%'.   

 

 
	
 

   AA	A
Ac               j    | j                  dt        t           t        ||||ddi      t              S r>   )r@   r   r   r   rA   s        r    rB   zAsyncModels.list   sH     !!5!(+'%'.  " 
 	
r"   c                  K   |st        d|      | j                  t        d|      t        ||||ddi      t               d{   S 7 w)	rD   r.   r/   r0   r2   Tr3   r5   NrE   r;   s         r    rG   zAsyncModels.delete   sl     2 STYS\]^^\\+59(+'%'. ! " 

 

 
	
 

r\   )rH   rX   )rH   rZ   rI   )
r(   rK   r)   rL   r*   rM   r+   rN   rH   z'AsyncPaginator[Model, AsyncPage[Model]]rO   rP   rU   r"   r    r   r      s   D0 0 6 6 )-$("&;D$
$
 &$
 "$
  $
 9$
 
$
V )-$("&;D

 &
 "
  
 9
 
1
B )-$("&;D%
%
 &%
 "%
  %
 9%
 
%
r"   c                      e Zd ZddZy)r   c                    || _         t        j                  |j                        | _        t        j                  |j                        | _        t        j                  |j
                        | _        y N)_modelsr   to_raw_response_wrapperr<   rB   rG   r   modelss     r    __init__zModelsWithRawResponse.__init__  sX    (@@OO
 %<<KK
	 '>>MM
r"   Nre   r   rH   NonerQ   rR   rS   rf   rU   r"   r    r   r         
r"   r   c                      e Zd ZddZy)rX   c                    || _         t        j                  |j                        | _        t        j                  |j                        | _        t        j                  |j
                        | _        y ra   )rb   r   async_to_raw_response_wrapperr<   rB   rG   rd   s     r    rf   z#AsyncModelsWithRawResponse.__init__&  sX    (FFOO
 %BBKK
	 'DDMM
r"   Nre   r   rH   rh   ri   rU   r"   r    rX   rX   %  rj   r"   rX   c                      e Zd ZddZy)r%   c                    || _         t        |j                        | _        t        |j                        | _        t        |j                        | _        y ra   )rb   r   r<   rB   rG   rd   s     r    rf   z$ModelsWithStreamingResponse.__init__5  sF    4OO
 1KK
	 3MM
r"   Nrg   ri   rU   r"   r    r%   r%   4  rj   r"   r%   c                      e Zd ZddZy)rZ   c                    || _         t        |j                        | _        t        |j                        | _        t        |j                        | _        y ra   )rb   r   r<   rB   rG   rd   s     r    rf   z)AsyncModelsWithStreamingResponse.__init__D  sF    :OO
 7KK
	 9MM
r"   Nrn   ri   rU   r"   r    rZ   rZ   C  rj   r"   rZ   )&
__future__r   httpx r   _typesr   r   r   r	   r
   _utilsr   _compatr   	_resourcer   r   	_responser   r   
paginationr   r   types.modelr   _base_clientr   r   types.model_deletedr   __all__r   r   r   rX   r%   rZ   rU   r"   r    <module>r      s    #   > > " % 9 X ,  /]
#|
_ |
~|
" |
~
 

 

 

 
r"   