
    -2i                    ~   d dl mZ d dlmZmZ d dlZddlmZ ddlm	Z	 ddl
mZmZmZmZmZmZ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mZ ddlmZ ddl m!Z! ddl"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 )    )annotations)UnionIterableN   )_legacy_response)moderation_create_params)BodyOmitQueryHeadersNotGivenSequenceNotStromit	not_given)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                  T    e Zd Zedd            Zedd            ZedddedddZdS )r   returnModerationsWithRawResponsec                     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    [/var/www/html/pixcura-vrs/venv/lib/python3.11/site-packages/openai/resources/moderations.pywith_raw_responsezModerations.with_raw_response   s     *$///     ModerationsWithStreamingResponsec                     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#Moderations.with_streaming_response#   s     0555r'   Nmodelextra_headersextra_query
extra_bodytimeoutinputIUnion[str, SequenceNotStr[str], Iterable[ModerationMultiModalInputParam]]r-   "Union[str, ModerationModel] | Omitr.   Headers | Noner/   Query | Noner0   Body | Noner1   'float | httpx.Timeout | None | NotGivenr   c          
         |                      dt          ||dt          j                  t	          ||||          t
                    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r2   r-   r.   r/   r0   r1   bodyoptionscast_to)_postr   r   ModerationCreateParamsr   r   r$   r2   r-   r.   r/   r0   r1   s          r%   createzModerations.create,   sl    D zz ""  )?  )+Q[el   -  
 
 	
r'   )r   r    )r   r(   r2   r3   r-   r4   r.   r5   r/   r6   r0   r7   r1   r8   r   r   	__name__
__module____qualname__r   r&   r+   r   r   rE    r'   r%   r   r      s        0 0 0 _0 6 6 6 _6 59 )-$("&;D/
 /
 /
 /
 /
 /
 /
 /
r'   c                  T    e Zd Zedd            Zedd            ZedddedddZdS )r   r   AsyncModerationsWithRawResponsec                     t          |           S r"   )rM   r#   s    r%   r&   z"AsyncModerations.with_raw_response_   s     /t444r'   %AsyncModerationsWithStreamingResponsec                     t          |           S r*   )rO   r#   s    r%   r+   z(AsyncModerations.with_streaming_responsei   s     5T:::r'   Nr,   r2   r3   r-   r4   r.   r5   r/   r6   r0   r7   r1   r8   r   c          
        K   |                      dt          ||dt          j                   d{V t	          ||||          t
                     d{V S )r:   r;   r<   Nr=   r>   )rB   r   r   rC   r   r   rD   s          r%   rE   zAsyncModerations.creater   s      D ZZ,""  )?        )+Q[el   -   
 
 
 
 
 
 
 
 	
r'   )r   rM   )r   rO   rF   rG   rK   r'   r%   r   r   ^   s        5 5 5 _5 ; ; ; _; 59 )-$("&;D/
 /
 /
 /
 /
 /
 /
 /
r'   c                      e Zd ZddZdS )r    moderationsr   r   Nonec                P    || _         t          j        |j                  | _        d S N)_moderationsr   to_raw_response_wrapperrE   r$   rS   s     r%   __init__z#ModerationsWithRawResponse.__init__   s(    '&>
 
r'   NrS   r   r   rT   rH   rI   rJ   rZ   rK   r'   r%   r    r       (        
 
 
 
 
 
r'   r    c                      e Zd ZddZdS )rM   rS   r   r   rT   c                P    || _         t          j        |j                  | _        d S rV   )rW   r   async_to_raw_response_wrapperrE   rY   s     r%   rZ   z(AsyncModerationsWithRawResponse.__init__   s(    '&D
 
r'   NrS   r   r   rT   r\   rK   r'   r%   rM   rM      r]   r'   rM   c                      e Zd ZddZdS )r(   rS   r   r   rT   c                F    || _         t          |j                  | _        d S rV   )rW   r   rE   rY   s     r%   rZ   z)ModerationsWithStreamingResponse.__init__   s%    '2
 
r'   Nr[   r\   rK   r'   r%   r(   r(      r]   r'   r(   c                      e Zd ZddZdS )rO   rS   r   r   rT   c                F    || _         t          |j                  | _        d S rV   )rW   r   rE   rY   s     r%   rZ   z.AsyncModerationsWithStreamingResponse.__init__   s%    '8
 
r'   Nra   r\   rK   r'   r%   rO   rO      r]   r'   rO   )-
__future__r   typingr   r   httpx r   typesr   _typesr	   r
   r   r   r   r   r   r   _utilsr   r   _compatr   	_resourcer   r   	_responser   r   _base_clientr   types.moderation_modelr    types.moderation_create_responser   (types.moderation_multi_modal_input_paramr   __all__r   r   r    rM   r(   rO   rK   r'   r%   <module>ru      sX   # " " " " " " " " " " " " "        , , , , , , Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z ; ; ; ; ; ; ; ; % % % % % % 9 9 9 9 9 9 9 9 X X X X X X X X / / / / / / 4 4 4 4 4 4 G G G G G G U U U U U U,
-C
 C
 C
 C
 C
/ C
 C
 C
LC
 C
 C
 C
 C
' C
 C
 C
L
 
 
 
 
 
 
 

 
 
 
 
 
 
 

 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
r'   