o
    Cji!                     @  s   d dl mZ d dlmZ d dl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mZ ddlmZmZ dd	lmZmZ dd
lmZmZ erPddlmZmZ ddgZG dd deZG dd deZG dd dZ G dd dZ!dS )    )annotations)TYPE_CHECKINGN   )ModelModelDeleted)	NOT_GIVENBodyQueryHeadersNotGiven)SyncAPIResourceAsyncAPIResource)to_raw_response_wrapperasync_to_raw_response_wrapper)SyncPage	AsyncPage)AsyncPaginatormake_request_options)OpenAIAsyncOpenAIModelsAsyncModelsc                      j   e Zd ZU ded< d fddZd	d	d	ed
dddZd	d	d	ed
d ddZd	d	d	ed
d!ddZ  Z	S )"r   ModelsWithRawResponsewith_raw_responseclientr   returnNonec                      t  | t| | _d S N)super__init__r   r   selfr   	__class__ n/var/www/html/Resume-Parser/resume-parser-inhouse/venv/lib/python3.10/site-packages/openai/resources/models.pyr!         zModels.__init__Nextra_headersextra_query
extra_bodytimeoutmodelstrr*   Headers | Noner+   Query | Noner,   Body | Noner-   'float | httpx.Timeout | None | NotGivenr   c                C  "   | j d| t||||dtd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
        /models/r)   optionscast_to_getr   r   r#   r.   r*   r+   r,   r-   r&   r&   r'   retrieve   s   zModels.retrieveSyncPage[Model]c             	   C  "   | j dtt t||||dtdS z
        Lists the currently available models, and provides basic information about each
        one such as the owner and availability.
        z/modelsr)   )pager8   r.   )_get_api_listr   r   r   r#   r*   r+   r,   r-   r&   r&   r'   list=      zModels.listr   c                C  r4   )  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
        r6   r)   r7   _deleter   r   r<   r&   r&   r'   deleteT   s   zModels.delete)r   r   r   r   r.   r/   r*   r0   r+   r1   r,   r2   r-   r3   r   r   )
r*   r0   r+   r1   r,   r2   r-   r3   r   r>   r.   r/   r*   r0   r+   r1   r,   r2   r-   r3   r   r   
__name__
__module____qualname____annotations__r!   r   r=   rD   rI   __classcell__r&   r&   r$   r'   r      $   
 
%c                      r   )"r   AsyncModelsWithRawResponser   r   r   r   r   c                   r   r   )r    r!   rS   r   r"   r$   r&   r'   r!   y   r(   zAsyncModels.__init__Nr)   r.   r/   r*   r0   r+   r1   r,   r2   r-   r3   r   c                  *   | j d| t||||dtdI dH S )r5   r6   r)   r7   Nr:   r<   r&   r&   r'   r=   }   s   zAsyncModels.retrieve'AsyncPaginator[Model, AsyncPage[Model]]c             	   C  r?   r@   )rB   r   r   r   rC   r&   r&   r'   rD      rE   zAsyncModels.listr   c                  rT   )rF   r6   r)   r7   NrG   r<   r&   r&   r'   rI      s   zAsyncModels.delete)r   r   r   r   rJ   )
r*   r0   r+   r1   r,   r2   r-   r3   r   rU   rK   rL   r&   r&   r$   r'   r   v   rR   c                   @     e Zd ZdddZdS )	r   modelsr   r   r   c                 C  (   t |j| _t |j| _t |j| _d S r   )r   r=   rD   rI   r#   rW   r&   r&   r'   r!         
zModelsWithRawResponse.__init__N)rW   r   r   r   rM   rN   rO   r!   r&   r&   r&   r'   r          r   c                   @  rV   )	rS   rW   r   r   r   c                 C  rX   r   )r   r=   rD   rI   rY   r&   r&   r'   r!      rZ   z#AsyncModelsWithRawResponse.__init__N)rW   r   r   r   r[   r&   r&   r&   r'   rS      r\   rS   )"
__future__r   typingr   httpxtypesr   r   _typesr   r   r	   r
   r   	_resourcer   r   	_responser   r   
paginationr   r   _base_clientr   r   _clientr   r   __all__r   r   r   rS   r&   r&   r&   r'   <module>   s    ``