
    Ii                    @   S SK Jr  S SKJrJr  S SK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  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/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)ListUnion)LiteralN   )_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)ModerationCreateResponseModerationsAsyncModerationsc                  p    \ 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      c                    [        U 5      $ N)ModerationsWithRawResponseselfs    B/venv/lib/python3.13/site-packages/openai/resources/moderations.pywith_raw_responseModerations.with_raw_response   s    )$//    c                    [        U 5      $ r   ) ModerationsWithStreamingResponser   s    r!   with_streaming_response#Moderations.with_streaming_response!   s    /55r$   Nmodelextra_headersextra_query
extra_bodytimeoutc               t    U R                  S[        UUS.[        R                  5      [	        X4XVS9[
        S9$ )0  
Classifies if text is potentially harmful.

Args:
  input: The input text to classify

  model: Two content moderations models are available: `text-moderation-stable` and
      `text-moderation-latest`.

      The default is `text-moderation-latest` which will be automatically upgraded
      over time. This ensures you are always using our most accurate model. If you use
      `text-moderation-stable`, we will provide advanced notice before updating the
      model. Accuracy of `text-moderation-stable` may be slightly lower than for
      `text-moderation-latest`.

  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*   r+   r,   r-   r.   bodyoptionscast_to)_postr   r	   ModerationCreateParamsr   r   r    r3   r*   r+   r,   r-   r.   s          r!   createModerations.create%   sQ    F zz "" )?? )+Q[ -  
 	
r$    )returnr   )r?   r&   r3   zUnion[str, List[str]]r*   zRUnion[str, Literal['text-moderation-latest', 'text-moderation-stable']] | NotGivenr+   zHeaders | Noner,   zQuery | Noner-   zBody | Noner.   z'float | httpx.Timeout | None | NotGivenr?   r   
__name__
__module____qualname____firstlineno__r   r"   r'   r
   r<   __static_attributes__r>   r$   r!   r   r      s    0 0 6 6 en )-$("&;D0
 %0
 b	0
 &0
 "0
  0
 90
 
"0
 0
r$   c                  p    \ 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   X   c                    [        U 5      $ r   )AsyncModerationsWithRawResponser   s    r!   r"   "AsyncModerations.with_raw_responseY   s    .t44r$   c                    [        U 5      $ r   )%AsyncModerationsWithStreamingResponser   s    r!   r'   (AsyncModerations.with_streaming_response]   s    4T::r$   Nr)   c                  #    U R                  S[        UUS.[        R                  5      I Sh  vN [	        X4XVS9[
        S9I Sh  vN $  N N7f)r0   r1   r2   Nr4   r5   )r9   r   r	   r:   r   r   r;   s          r!   r<   AsyncModerations.createa   sh     F ZZ,"" )??  )+Q[ -   
 
 	

s!   -AA
AAAAr>   )r?   rJ   )r?   rM   r@   rA   r>   r$   r!   r   r   X   s    5 5 ; ; en )-$("&;D0
 %0
 b	0
 &0
 "0
  0
 90
 
"0
 0
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 r   )_moderationsr   to_raw_response_wrapperr<   r    moderationss     r!   __init__#ModerationsWithRawResponse.__init__   s#    '&>>
r$   rT   r<   NrW   r   r?   NonerB   rC   rD   rE   rX   rF   r>   r$   r!   r   r          
r$   r   c                      \ rS rSrSS jrSrg)rJ      c                Z    Xl         [        R                  " UR                  5      U l        g r   )rT   r   async_to_raw_response_wrapperr<   rV   s     r!   rX   (AsyncModerationsWithRawResponse.__init__   s#    '&DD
r$   rZ   NrW   r   r?   r\   r]   r>   r$   r!   rJ   rJ      r^   r$   rJ   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   )rT   r   r<   rV   s     r!   rX   )ModerationsWithStreamingResponse.__init__   s    '2
r$   rZ   Nr[   r]   r>   r$   r!   r&   r&      r^   r$   r&   c                      \ rS rSrSS jrSrg)rM      c                D    Xl         [        UR                  5      U l        g r   )rT   r   r<   rV   s     r!   rX   .AsyncModerationsWithStreamingResponse.__init__   s    '8
r$   rZ   Nrd   r]   r>   r$   r!   rM   rM      r^   r$   rM   )(
__future__r   typingr   r   typing_extensionsr   httpx r   typesr	   _typesr
   r   r   r   r   _utilsr   r   _compatr   	_resourcer   r   	_responser   r   _base_clientr    types.moderation_create_responser   __all__r   r   r   rJ   r&   rM   r>   r$   r!   <module>r{      s    #  %   , > > & 9 X H,
-9
/ 9
x9
' 9
x
 

 

 

 
r$   