
    _j                     X   S SK Jr  S SKJrJr  S SKrSSKJr  SSKJ	r	  SSK
JrJrJrJrJrJrJrJr  SSKJrJr  SS	KJr  SS
KJrJr  SSKJrJr  SSKJr  SSK J!r!  SSK"J#r#  SSK$J%r%  SS/r& " S S\5      r' " S S\5      r( " S S5      r) " S S5      r* " S S5      r+ " S S5      r,g)    )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    \ rS rSrSr\S	S j5       r\S
S j5       r\SSS\	S.             SS jjr
Srg)r      U
Given text and/or image inputs, classifies if those inputs are potentially harmful.
c                    [        U 5      $ z
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    Q/home/rurouni/.local/lib/python3.13/site-packages/openai/resources/moderations.pywith_raw_responseModerations.with_raw_response   s     *$//    c                    [        U 5      $ 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_response#Moderations.with_streaming_response'   s     055r)   Nmodelextra_headersextra_query
extra_bodytimeoutc               ~    U R                  S[        UUS.[        R                  5      [	        UUUUSS0S9[
        S9$ ):  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inputr0   bearer_authTr1   r2   r3   r4   securitybodyoptionscast_to)_postr   r   ModerationCreateParamsr   r   r%   r9   r0   r1   r2   r3   r4   s          r&   createModerations.create0   s_    D zz "" )?? )+'%'. -!  
 	
r)    )returnr#   )rG   r,   r9   zIUnion[str, SequenceNotStr[str], Iterable[ModerationMultiModalInputParam]]r0   z"Union[str, ModerationModel] | Omitr1   zHeaders | Noner2   zQuery | Noner3   zBody | Noner4   z'float | httpx.Timeout | None | NotGivenrG   r   __name__
__module____qualname____firstlineno____doc__r   r'   r-   r   r   rD   __static_attributes__rF   r)   r&   r   r      s     0 0 6 6 59 )-$("&;D3
 Y3
 2	3
 &3
 "3
  3
 93
 
"3
 3
r)   c                  t    \ rS rSrSr\S	S j5       r\S
S j5       r\SSS\	S.             SS jjr
Srg)r   f   r    c                    [        U 5      $ r"   )AsyncModerationsWithRawResponser$   s    r&   r'   "AsyncModerations.with_raw_responsek   s     /t44r)   c                    [        U 5      $ r+   )%AsyncModerationsWithStreamingResponser$   s    r&   r-   (AsyncModerations.with_streaming_responseu   s     5T::r)   Nr/   c                  #    U R                  S[        UUS.[        R                  5      I Sh  vN [	        UUUUSS0S9[
        S9I Sh  vN $  N! N7f)r6   r7   r8   Nr:   Tr;   r=   )rA   r   r   rB   r   r   rC   s          r&   rD   AsyncModerations.create~   sv     D ZZ,"" )??  )+'%'. -!   
 
 	

s!   -AA
AAAArF   )rG   rS   )rG   rV   rH   rI   rF   r)   r&   r   r   f   s     5 5 ; ; 59 )-$("&;D3
 Y3
 2	3
 &3
 "3
  3
 93
 
"3
 3
r)   c                      \ rS rSrSS jrSrg)r#      c                Z    Xl         [        R                  " UR                  5      U l        g N)_moderationsr   to_raw_response_wrapperrD   r%   moderationss     r&   __init__#ModerationsWithRawResponse.__init__   s#    '&>>
r)   r^   rD   Nra   r   rG   NonerJ   rK   rL   rM   rb   rO   rF   r)   r&   r#   r#          
r)   r#   c                      \ rS rSrSS jrSrg)rS      c                Z    Xl         [        R                  " UR                  5      U l        g r]   )r^   r   async_to_raw_response_wrapperrD   r`   s     r&   rb   (AsyncModerationsWithRawResponse.__init__   s#    '&DD
r)   rd   Nra   r   rG   rf   rg   rF   r)   r&   rS   rS      rh   r)   rS   c                      \ rS rSrSS jrSrg)r,      c                D    Xl         [        UR                  5      U l        g r]   )r^   r   rD   r`   s     r&   rb   )ModerationsWithStreamingResponse.__init__   s    '2
r)   rd   Nre   rg   rF   r)   r&   r,   r,      rh   r)   r,   c                      \ rS rSrSS jrSrg)rV      c                D    Xl         [        UR                  5      U l        g r]   )r^   r   rD   r`   s     r&   rb   .AsyncModerationsWithStreamingResponse.__init__   s    '8
r)   rd   Nrn   rg   rF   r)   r&   rV   rV      rh   r)   rV   )-
__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#   rS   r,   rV   rF   r)   r&   <module>r      s    # "   , Z Z Z ; % 9 X / 4 G U,
-K
/ K
\K
' K
\
 

 

 

 
r)   