o
    +Âifî'  ã                   @  s  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„ deƒZG dd„ deƒZG dd„ dƒZ G dd„ dƒZ!G dd„ dƒZ"G dd„ dƒZ#dS )é    )ÚannotationsNé   )Ú_legacy_response)Ú	NOT_GIVENÚBodyÚQueryÚHeadersÚNotGiven)Úcached_property)ÚSyncAPIResourceÚAsyncAPIResource)Úto_streamed_response_wrapperÚ"async_to_streamed_response_wrapper)ÚSyncPageÚ	AsyncPage)ÚModel)ÚAsyncPaginatorÚmake_request_options)ÚModelDeletedÚModelsÚAsyncModelsc                   @  ój   e Zd Zeddd„ƒZed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	dS )"r   ÚreturnÚModelsWithRawResponsec                 C  ó   t | ƒS ©N)r   ©Úself© r   úP/var/www/html/corbot_env/lib/python3.10/site-packages/openai/resources/models.pyÚwith_raw_response   ó   zModels.with_raw_responseÚModelsWithStreamingResponsec                 C  r   r   )r"   r   r   r   r   Úwith_streaming_response   r!   zModels.with_streaming_responseN©Úextra_headersÚextra_queryÚ
extra_bodyÚtimeoutÚmodelÚstrr%   úHeaders | Noner&   úQuery | Noner'   úBody | Noner(   ú'float | httpx.Timeout | None | NotGivenr   c                C  ó4   |s	t d|›�ƒ‚| 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
        ú4Expected a non-empty value for `model` but received ú/models/r$   ©ÚoptionsÚcast_to©Ú
ValueErrorÚ_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$   )Úpager4   r)   )Ú_get_api_listr   r   r   ©r   r%   r&   r'   r(   r   r   r   ÚlistB   ó   ÿúzModels.listr   c                C  r/   )á›  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
        r1   r2   r$   r3   ©r7   Ú_deleter   r   r9   r   r   r   ÚdeleteY   s   ÿûzModels.delete)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:   rA   rF   r   r   r   r   r      ó(    	÷'ø÷c                   @  r   )"r   r   ÚAsyncModelsWithRawResponsec                 C  r   r   )rN   r   r   r   r   r    ~   r!   zAsyncModels.with_raw_responseÚ AsyncModelsWithStreamingResponsec                 C  r   r   )rO   r   r   r   r   r#   ‚   r!   z#AsyncModels.with_streaming_responseNr$   r)   r*   r%   r+   r&   r,   r'   r-   r(   r.   r   c                Ã  ó<   �|s
t d|›�ƒ‚| jd|› �t||||d�td�I dH S )r0   r1   r2   r$   r3   Nr6   r9   r   r   r   r:   †   s   €ÿûzAsyncModels.retrieveú'AsyncPaginator[Model, AsyncPage[Model]]c             	   C  r<   r=   )r?   r   r   r   r@   r   r   r   rA   ¨   rB   zAsyncModels.listr   c                Ã  rP   )rC   r1   r2   r$   r3   NrD   r9   r   r   r   rF   ¿   s   €ÿûzAsyncModels.delete)r   rN   )r   rO   rG   )
r%   r+   r&   r,   r'   r-   r(   r.   r   rQ   rH   rI   r   r   r   r   r   }   rM   c                   @  ó   e Zd Zddd„ZdS )	r   Úmodelsr   r   ÚNonec                 C  ó4   || _ t |j¡| _t |j¡| _t |j¡| _d S r   )Ú_modelsr   Úto_raw_response_wrapperr:   rA   rF   ©r   rS   r   r   r   Ú__init__ä   ó   ÿÿ
ÿzModelsWithRawResponse.__init__N©rS   r   r   rT   ©rJ   rK   rL   rY   r   r   r   r   r   ã   ó    r   c                   @  rR   )	rN   rS   r   r   rT   c                 C  rU   r   )rV   r   Úasync_to_raw_response_wrapperr:   rA   rF   rX   r   r   r   rY   ó   rZ   z#AsyncModelsWithRawResponse.__init__N©rS   r   r   rT   r\   r   r   r   r   rN   ò   r]   rN   c                   @  rR   )	r"   rS   r   r   rT   c                 C  ó.   || _ t|jƒ| _t|jƒ| _t|jƒ| _d S r   )rV   r   r:   rA   rF   rX   r   r   r   rY     ó   ÿÿ
ÿz$ModelsWithStreamingResponse.__init__Nr[   r\   r   r   r   r   r"     r]   r"   c                   @  rR   )	rO   rS   r   r   rT   c                 C  r`   r   )rV   r   r:   rA   rF   rX   r   r   r   rY     ra   z)AsyncModelsWithStreamingResponse.__init__Nr_   r\   r   r   r   r   rO     r]   rO   )$Ú
__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   rN   r"   rO   r   r   r   r   Ú<module>   s$   ff