
    i,                    Z   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%dS )    )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
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    ^/home/ubuntu/.hermes/hermes-agent/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|          |                     t          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/{model}r-   r(   optionscast_to
ValueError_getr   r   r   r    r-   r)   r*   r+   r,   s         r!   retrievezModels.retrieve.   ss    0  	_]TY]]^^^yy+5999(+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(   )pager9   r-   )_get_api_listr   r   r   r    r)   r*   r+   r,   s        r!   listzModels.listP   sM     !!%(+Q[el    " 
 
 	
r#   r   c          	         |st          d|          |                     t          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
        r5   r6   r7   r(   r8   r<   _deleter   r   r   r>   s         r!   deletezModels.deleteg   ss    2  	_]TY]]^^^||+5999(+Q[el   !  
 
 	
r#   )r   r   )r   r$   r-   r.   r)   r/   r*   r0   r+   r1   r,   r2   r   r   )
r)   r/   r*   r0   r+   r1   r,   r2   r   r@   r-   r.   r)   r/   r*   r0   r+   r1   r,   r2   r   r   __name__
__module____qualname____doc__r   r"   r'   r
   r?   rF   rK    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   )rU   r   s    r!   r"   zAsyncModels.with_raw_response   s     *$///r#    AsyncModelsWithStreamingResponsec                     t          |           S r&   )rW   r   s    r!   r'   z#AsyncModels.with_streaming_response   s     0555r#   Nr(   r-   r.   r)   r/   r*   r0   r+   r1   r,   r2   r   c          	        K   |st          d|          |                     t          d|          t          ||||          t                     d{V S )r4   r5   r6   r7   r(   r8   Nr;   r>   s         r!   r?   zAsyncModels.retrieve   s      0  	_]TY]]^^^YY+5999(+Q[el     
 
 
 
 
 
 
 
 	
r#   'AsyncPaginator[Model, AsyncPage[Model]]c          
         |                      dt          t                   t          ||||          t                    S rB   )rD   r   r   r   rE   s        r!   rF   zAsyncModels.list   sN     !!5!(+Q[el    " 
 
 	
r#   r   c          	        K   |st          d|          |                     t          d|          t          ||||          t                     d{V S )rH   r5   r6   r7   r(   r8   NrI   r>   s         r!   rK   zAsyncModels.delete   s      2  	_]TY]]^^^\\+5999(+Q[el   ! " 
 
 
 
 
 
 
 
 	
r#   )r   rU   )r   rW   rL   )
r)   r/   r*   r0   r+   r1   r,   r2   r   rZ   rM   rN   rS   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?   rF   rK   r    r^   s     r!   __init__zModelsWithRawResponse.__init__   s\    (@O
 
 %<K
 
	 '>M
 
r#   Nr^   r   r   r_   rO   rP   rQ   re   rS   r#   r!   r   r      (        
 
 
 
 
 
r#   r   c                      e Zd ZddZdS )rU   r^   r   r   r_   c                    || _         t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        d S ra   )rb   r   async_to_raw_response_wrapperr?   rF   rK   rd   s     r!   re   z#AsyncModelsWithRawResponse.__init__  s\    (FO
 
 %BK
 
	 'DM
 
r#   Nr^   r   r   r_   rg   rS   r#   r!   rU   rU     rh   r#   rU   c                      e Zd ZddZdS )r$   r^   r   r   r_   c                    || _         t          |j                  | _        t          |j                  | _        t          |j                  | _        d S ra   )rb   r   r?   rF   rK   rd   s     r!   re   z$ModelsWithStreamingResponse.__init__  sS    4O
 
 1K
 
	 3M
 
r#   Nrf   rg   rS   r#   r!   r$   r$     rh   r#   r$   c                      e Zd ZddZdS )rW   r^   r   r   r_   c                    || _         t          |j                  | _        t          |j                  | _        t          |j                  | _        d S ra   )rb   r   r?   rF   rK   rd   s     r!   re   z)AsyncModelsWithStreamingResponse.__init__,  sS    :O
 
 7K
 
	 9M
 
r#   Nrl   rg   rS   r#   r!   rW   rW   +  rh   r#   rW   )&
__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   rU   r$   rW   rS   r#   r!   <module>r~      s3   # " " " " "        > > > > > > > > > > > > > > " " " " " " % % % % % % 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#   