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__/moderations.cpython-310.pyc
o

���gu�@s,ddlmZddlmZmZmZddlZddlmZddl	m
Z
ddlmZm
Z
mZmZmZddlmZmZdd	lmZdd
lmZmZddlmZmZddlmZdd
lmZddl m!Z!ddl"m#Z#ddgZ$Gdd�de�Z%Gdd�de�Z&Gdd�d�Z'Gdd�d�Z(Gdd�d�Z)Gdd�d�Z*dS)�)�annotations)�List�Union�IterableN�)�_legacy_response)�moderation_create_params)�	NOT_GIVEN�Body�Query�Headers�NotGiven)�maybe_transform�async_maybe_transform)�cached_property)�SyncAPIResource�AsyncAPIResource)�to_streamed_response_wrapper�"async_to_streamed_response_wrapper)�make_request_options)�ModerationModel)�ModerationCreateResponse)�ModerationMultiModalInputParam�Moderations�AsyncModerationsc@�@eZdZeddd��Zeddd��Zeddded	�ddd�ZdS)r�return�ModerationsWithRawResponsecC�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"�G/usr/local/lib/python3.10/dist-packages/openai/resources/moderations.py�with_raw_response�zModerations.with_raw_response� ModerationsWithStreamingResponsecCr�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 r"r"r#�with_streaming_response&�z#Moderations.with_streaming_responseN��model�
extra_headers�extra_query�
extra_body�timeout�input�?Union[str, List[str], Iterable[ModerationMultiModalInputParam]]r+�&Union[str, ModerationModel] | NotGivenr,�Headers | Noner-�Query | Noner.�Body | Noner/�'float | httpx.Timeout | None | NotGivenrc	Cs,|jdt||d�tj�t||||d�td�S)�Classifies if text and/or image inputs are potentially harmful.

        Learn more in
        the [moderation guide](https://platform.openai.com/docs/guides/moderation).

        Args:
          input: Input (or inputs) to classify. Can be a single string, an array of strings, or
              an array of multi-modal input objects similar to other models.

          model: The content moderation model you would like to use. Learn more in
              [the moderation guide](https://platform.openai.com/docs/guides/moderation), and
              learn about available models
              [here](https://platform.openai.com/docs/models#moderation).

          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
        �/moderations�r0r+�r,r-r.r/��body�options�cast_to)�_postrr�ModerationCreateParamsrr�r!r0r+r,r-r.r/r"r"r#�create/s"����zModerations.create)rr)rr&�r0r1r+r2r,r3r-r4r.r5r/r6rr��__name__�
__module__�__qualname__rr$r(r	rBr"r"r"r#r�	�c@r)rr�AsyncModerationsWithRawResponsecCrr)rIr r"r"r#r$br%z"AsyncModerations.with_raw_response�%AsyncModerationsWithStreamingResponsecCrr')rJr r"r"r#r(lr)z(AsyncModerations.with_streaming_responseNr*r0r1r+r2r,r3r-r4r.r5r/r6rc	�s:�|jdt||d�tj�IdHt||||d�td�IdHS)r7r8r9Nr:r;)r?rrr@rrrAr"r"r#rBus�"����zAsyncModerations.create)rrI)rrJrCrDr"r"r"r#rarHc@�eZdZddd�ZdS)	r�moderationsrr�NonecC�||_t�|j�|_dS�N)�_moderationsr�to_raw_response_wrapperrB�r!rLr"r"r#�__init__��
�z#ModerationsWithRawResponse.__init__N�rLrrrM�rErFrGrSr"r"r"r#r��rc@rK)	rIrLrrrMcCrNrO)rPr�async_to_raw_response_wrapperrBrRr"r"r#rS�rTz(AsyncModerationsWithRawResponse.__init__N�rLrrrMrVr"r"r"r#rI�rWrIc@rK)	r&rLrrrMcC�||_t|j�|_dSrO)rPrrBrRr"r"r#rS��
�z)ModerationsWithStreamingResponse.__init__NrUrVr"r"r"r#r&�rWr&c@rK)	rJrLrrrMcCrZrO)rPrrBrRr"r"r#rS�r[z.AsyncModerationsWithStreamingResponse.__init__NrYrVr"r"r"r#rJ�rWrJ)+�
__future__r�typingrrr�httpx�r�typesr�_typesr	r
rrr
�_utilsrr�_compatr�	_resourcerr�	_responserr�_base_clientr�types.moderation_modelr� types.moderation_create_responser�(types.moderation_multi_modal_input_paramr�__all__rrrrIr&rJr"r"r"r#�<module>s*FF