
    g}                    P   d dl mZ d dlmZ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 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)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                  `    e Zd Zedd       Zedd       Zeddded	 	 	 	 	 	 	 	 	 	 	 	 	 ddZy)	r   c                    t        |       S a  
        This property can be used as a prefix for any HTTP method call to return the
        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/var/www/openai/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	        ||||      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*   r+   r,   r-   r.   bodyoptionscast_to)_postr   r	   ModerationCreateParamsr   r   r!   r3   r*   r+   r,   r-   r.   s          r"   createzModerations.create/   sV    D zz "" )?? )+Q[el -  
 	
r$   )returnr   )r=   r'   r3   z?Union[str, List[str], Iterable[ModerationMultiModalInputParam]]r*   z&Union[str, ModerationModel] | NotGivenr+   zHeaders | Noner,   zQuery | Noner-   zBody | Noner.   z'float | httpx.Timeout | None | NotGivenr=   r   __name__
__module____qualname__r   r#   r(   r
   r<    r$   r"   r   r      s    0 0 6 6 9B )-$("&;D/
 O/
 6	/
 &/
 "/
  /
 9/
 
"/
r$   c                  `    e Zd Zedd       Zedd       Zeddded	 	 	 	 	 	 	 	 	 	 	 	 	 ddZy)	r   c                    t        |       S r   )AsyncModerationsWithRawResponser    s    r"   r#   z"AsyncModerations.with_raw_responseb   s     /t44r$   c                    t        |       S r&   )%AsyncModerationsWithStreamingResponser    s    r"   r(   z(AsyncModerations.with_streaming_responsel   s     5T::r$   Nr)   c          
        K   | j                  dt        ||dt        j                         d{   t	        ||||      t
               d{   S 7 $7 w)r0   r1   r2   Nr4   r5   )r9   r   r	   r:   r   r   r;   s          r"   r<   zAsyncModerations.createu   so     D ZZ,"" )??  )+Q[el -   
 
 	

s!   -AA
AAAA)r=   rF   )r=   rH   r>   r?   rC   r$   r"   r   r   a   s    5 5 ; ; 9B )-$("&;D/
 O/
 6	/
 &/
 "/
  /
 9/
 
"/
r$   c                      e Zd ZddZy)r   c                Z    || _         t        j                  |j                        | _        y N)_moderationsr   to_raw_response_wrapperr<   r!   moderationss     r"   __init__z#ModerationsWithRawResponse.__init__   s%    '&>>
r$   NrP   r   r=   Noner@   rA   rB   rQ   rC   r$   r"   r   r          
r$   r   c                      e Zd ZddZy)rF   c                Z    || _         t        j                  |j                        | _        y rL   )rM   r   async_to_raw_response_wrapperr<   rO   s     r"   rQ   z(AsyncModerationsWithRawResponse.__init__   s%    '&DD
r$   NrP   r   r=   rS   rT   rC   r$   r"   rF   rF      rU   r$   rF   c                      e Zd ZddZy)r'   c                F    || _         t        |j                        | _        y rL   )rM   r   r<   rO   s     r"   rQ   z)ModerationsWithStreamingResponse.__init__   s    '2
r$   NrR   rT   rC   r$   r"   r'   r'      rU   r$   r'   c                      e Zd ZddZy)rH   c                F    || _         t        |j                        | _        y rL   )rM   r   r<   rO   s     r"   rQ   z.AsyncModerationsWithStreamingResponse.__init__   s    '8
r$   NrY   rT   rC   r$   r"   rH   rH      rU   r$   rH   )+
__future__r   typingr   r   r   httpx r   typesr	   _typesr
   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   rF   r'   rH   rC   r$   r"   <module>rm      s    # ( (   , > > & 9 X / 4 G U,
-C
/ C
LC
' C
L
 

 

 

 
r$   