HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/openai/resources/__pycache__/models.cpython-310.pyc
o

���g�+�@sddlmZddlZddlmZddlmZmZmZm	Z	m
Z
ddlmZddl
mZmZddlmZmZdd	lmZmZdd
lmZddlmZmZddlmZd
dgZGdd
�d
e�ZGdd�de�ZGdd�d�Z Gdd�d�Z!Gdd�d�Z"Gdd�d�Z#dS)�)�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@�jeZdZeddd��Zeddd��Zddded	�ddd�Zddded	�d dd�Zddded	�d!dd�Z	dS)"r�return�ModelsWithRawResponsecC�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��self�r�B/usr/local/lib/python3.10/dist-packages/openai/resources/models.py�with_raw_response�zModels.with_raw_response�ModelsWithStreamingResponsecCr�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"rrrr�with_streaming_response"�zModels.with_streaming_responseN��
extra_headers�extra_query�
extra_body�timeout�model�strr'�Headers | Noner(�Query | Noner)�Body | Noner*�'float | httpx.Timeout | None | NotGivenrcC�4|s	td|����|jd|��t||||d�td�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�_getrr�rr+r'r(r)r*rrr�retrieve+s��zModels.retrieve�SyncPage[Model]c	C�"|jdttt||||d�td�S�z�
        Lists the currently available models, and provides basic information about each
        one such as the owner and availability.
        z/modelsr&)�pager6r+)�
_get_api_listrrr�rr'r(r)r*rrr�listM���zModels.listrcCr1)�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
        r3r4r&r5�r9�_deleterrr;rrr�deleteds��z
Models.delete)rr)rr"�r+r,r'r-r(r.r)r/r*r0rr)
r'r-r(r.r)r/r*r0rr=�r+r,r'r-r(r.r)r/r*r0rr�
�__name__�
__module__�__qualname__r
r r$rr<rCrHrrrrr�(	�'��c@r)"rr�AsyncModelsWithRawResponsecCrr)rPrrrrr �r!zAsyncModels.with_raw_response� AsyncModelsWithStreamingResponsecCrr#)rQrrrrr$�r%z#AsyncModels.with_streaming_responseNr&r+r,r'r-r(r.r)r/r*r0rc��<�|s
td|����|jd|��t||||d�td�IdHS)r2r3r4r&r5Nr8r;rrrr<�s���zAsyncModels.retrieve�'AsyncPaginator[Model, AsyncPage[Model]]c	Cr>r?)rArrrrBrrrrC�rDzAsyncModels.listrc�rR)rEr3r4r&r5NrFr;rrrrH�s���zAsyncModels.delete)rrP)rrQrI)
r'r-r(r.r)r/r*r0rrSrJrKrrrrr�rOc@�eZdZddd�ZdS)	r�modelsrr�NonecC�4||_t�|j�|_t�|j�|_t�|j�|_dS�N)�_modelsr�to_raw_response_wrapperr<rCrH�rrUrrr�__init__����
�zModelsWithRawResponse.__init__N�rUrrrV�rLrMrNr\rrrrr��rc@rT)	rPrUrrrVcCrWrX)rYr�async_to_raw_response_wrapperr<rCrHr[rrrr\	r]z#AsyncModelsWithRawResponse.__init__N�rUrrrVr_rrrrrPr`rPc@rT)	r"rUrrrVcC�.||_t|j�|_t|j�|_t|j�|_dSrX)rYr
r<rCrHr[rrrr\���
�z$ModelsWithStreamingResponse.__init__Nr^r_rrrrr"r`r"c@rT)	rQrUrrrVcCrcrX)rYrr<rCrHr[rrrr\'rdz)AsyncModelsWithStreamingResponse.__init__Nrbr_rrrrrQ&r`rQ)$�
__future__r�httpx�r�_typesrrrrr	�_compatr
�	_resourcerr�	_responser
r�
paginationrr�types.modelr�_base_clientrr�types.model_deletedr�__all__rrrrPr"rQrrrr�<module>s$qq