
    2il,                    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)BodyQueryHeadersNotGiven	not_given)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
dS )r   :List and describe the various models available in the API.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    ^/root/.openclaw/workspace/.venv-openai/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'   )pager7   r,   )_get_api_listr   r   r   r   r(   r)   r*   r+   s        r    listzModels.listO   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
        r4   r5   r'   r6   r:   _deleter   r   r<   s         r    deletezModels.deletef   sm    2  	_]TY]]^^^||u(+Q[el   !  
 
 	
r"   )r   r   )r   r#   r,   r-   r(   r.   r)   r/   r*   r0   r+   r1   r   r   )
r(   r.   r)   r/   r*   r0   r+   r1   r   r>   r,   r-   r(   r.   r)   r/   r*   r0   r+   r1   r   r   __name__
__module____qualname____doc__r   r!   r&   r
   r=   rD   rI    r"   r    r   r      s        DD+ + + _+ 1 1 1 _1 )-$("&;D 
  
  
  
  
  
N )-$("&;D
 
 
 
 
 
: )-$("&;D!
 !
 !
 !
 !
 !
 !
 !
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
dS )r   r   r   AsyncModelsWithRawResponsec                     t          |           S r   )rS   r   s    r    r!   zAsyncModels.with_raw_response   s     *$///r"    AsyncModelsWithStreamingResponsec                     t          |           S r%   )rU   r   s    r    r&   z#AsyncModels.with_streaming_response   s     0555r"   Nr'   r,   r-   r(   r.   r)   r/   r*   r0   r+   r1   r   c          	        K   |st          d|          |                     d| t          ||||          t                     d{V S )r3   r4   r5   r'   r6   Nr9   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@   )rB   r   r   r   rC   s        r    rD   zAsyncModels.list   sN     !!5!(+Q[el    " 
 
 	
r"   r   c          	        K   |st          d|          |                     d| t          ||||          t                     d{V S )rF   r4   r5   r'   r6   NrG   r<   s         r    rI   zAsyncModels.delete   s      2  	_]TY]]^^^\\u(+Q[el   ! " 
 
 
 
 
 
 
 
 	
r"   )r   rS   )r   rU   rJ   )
r(   r.   r)   r/   r*   r0   r+   r1   r   rX   rK   rL   rQ   r"   r    r   r      s        DD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=   rD   rI   r   r\   s     r    __init__zModelsWithRawResponse.__init__   s\    (@O
 
 %<K
 
	 '>M
 
r"   Nr\   r   r   r]   rM   rN   rO   rc   rQ   r"   r    r   r      (        
 
 
 
 
 
r"   r   c                      e Zd ZddZdS )rS   r\   r   r   r]   c                    || _         t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        d S r_   )r`   r   async_to_raw_response_wrapperr=   rD   rI   rb   s     r    rc   z#AsyncModelsWithRawResponse.__init__  s\    (FO
 
 %BK
 
	 'DM
 
r"   Nr\   r   r   r]   re   rQ   r"   r    rS   rS     rf   r"   rS   c                      e Zd ZddZdS )r#   r\   r   r   r]   c                    || _         t          |j                  | _        t          |j                  | _        t          |j                  | _        d S r_   )r`   r   r=   rD   rI   rb   s     r    rc   z$ModelsWithStreamingResponse.__init__  sS    4O
 
 1K
 
	 3M
 
r"   Nrd   re   rQ   r"   r    r#   r#     rf   r"   r#   c                      e Zd ZddZdS )rU   r\   r   r   r]   c                    || _         t          |j                  | _        t          |j                  | _        t          |j                  | _        d S r_   )r`   r   r=   rD   rI   rb   s     r    rc   z)AsyncModelsWithStreamingResponse.__init__+  sS    :O
 
 7K
 
	 9M
 
r"   Nrj   re   rQ   r"   r    rU   rU   *  rf   r"   rU   )$
__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   rS   r#   rU   rQ   r"   r    <module>r{      s!   # " " " " "        > > > > > > > > > > > > > > % % % % % % 9 9 9 9 9 9 9 9 X X X X X X X X , , , , , , , ,              / . . . . .]
#p
 p
 p
 p
 p
_ p
 p
 p
fp
 p
 p
 p
 p
" p
 p
 p
f
 
 
 
 
 
 
 

 
 
 
 
 
 
 

 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
r"   