
    j                     X   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,y)    )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                  d    e Zd ZdZedd       Zedd       Zeddded	 	 	 	 	 	 	 	 	 	 	 	 	 d	dZ	y)
r   ]
    Given text and/or image inputs, classifies if those inputs are potentially harmful.
    c                    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
        )ModerationsWithRawResponseselfs    {/var/www/internaltesting/Shamanth/prverification/HIS_auto/venv/lib/python3.12/site-packages/openai/resources/moderations.pywith_raw_responsezModerations.with_raw_response   s     *$//    c                    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
        ) ModerationsWithStreamingResponser#   s    r%   with_streaming_responsez#Moderations.with_streaming_response'   s     055r'   Nmodelextra_headersextra_query
extra_bodytimeoutc                   | j                  dt        ||dt        j                        t	        ||||ddi      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inputr-   bearer_authTr.   r/   r0   r1   securitybodyoptionscast_to)_postr   r   ModerationCreateParamsr   r   r$   r6   r-   r.   r/   r0   r1   s          r%   createzModerations.create0   s_    D zz "" )?? )+'%'. -!  
 	
r'   )returnr"   )rB   r*   r6   zIUnion[str, SequenceNotStr[str], Iterable[ModerationMultiModalInputParam]]r-   z"Union[str, ModerationModel] | Omitr.   zHeaders | Noner/   zQuery | Noner0   zBody | Noner1   z'float | httpx.Timeout | None | NotGivenrB   r   
__name__
__module____qualname____doc__r   r&   r+   r   r   rA    r'   r%   r   r      s     0 0 6 6 59 )-$("&;D3
 Y3
 2	3
 &3
 "3
  3
 93
 
"3
r'   c                  d    e Zd ZdZedd       Zedd       Zeddded	 	 	 	 	 	 	 	 	 	 	 	 	 d	dZ	y)
r   r   c                    t        |       S r!   )AsyncModerationsWithRawResponser#   s    r%   r&   z"AsyncModerations.with_raw_responsek   s     /t44r'   c                    t        |       S r)   )%AsyncModerationsWithStreamingResponser#   s    r%   r+   z(AsyncModerations.with_streaming_responseu   s     5T::r'   Nr,   c                  K   | j                  dt        ||dt        j                         d{   t	        ||||ddi      t
               d{   S 7 '7 w)r3   r4   r5   Nr7   Tr8   r:   )r>   r   r   r?   r   r   r@   s          r%   rA   zAsyncModerations.create~   sx     D ZZ,"" )??  )+'%'. -!   
 
 	

s!   -AA
"AAAA)rB   rL   )rB   rN   rC   rD   rI   r'   r%   r   r   f   s     5 5 ; ; 59 )-$("&;D3
 Y3
 2	3
 &3
 "3
  3
 93
 
"3
r'   c                      e Zd ZddZy)r"   c                Z    || _         t        j                  |j                        | _        y N)_moderationsr   to_raw_response_wrapperrA   r$   moderationss     r%   __init__z#ModerationsWithRawResponse.__init__   s%    '&>>
r'   NrV   r   rB   NonerE   rF   rG   rW   rI   r'   r%   r"   r"          
r'   r"   c                      e Zd ZddZy)rL   c                Z    || _         t        j                  |j                        | _        y rR   )rS   r   async_to_raw_response_wrapperrA   rU   s     r%   rW   z(AsyncModerationsWithRawResponse.__init__   s%    '&DD
r'   NrV   r   rB   rY   rZ   rI   r'   r%   rL   rL      r[   r'   rL   c                      e Zd ZddZy)r*   c                F    || _         t        |j                        | _        y rR   )rS   r   rA   rU   s     r%   rW   z)ModerationsWithStreamingResponse.__init__   s    '2
r'   NrX   rZ   rI   r'   r%   r*   r*      r[   r'   r*   c                      e Zd ZddZy)rN   c                F    || _         t        |j                        | _        y rR   )rS   r   rA   rU   s     r%   rW   z.AsyncModerationsWithStreamingResponse.__init__   s    '8
r'   Nr_   rZ   rI   r'   r%   rN   rN      r[   r'   rN   )-
__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"   rL   r*   rN   rI   r'   r%   <module>rs      s    # "   , Z Z Z ; % 9 X / 4 G U,
-K
/ K
\K
' K
\
 

 

 

 
r'   