
    2iR                    ~   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                  X    e Zd ZdZedd            Zedd            ZedddedddZ	dS )r   ]
    Given text and/or image inputs, classifies if those inputs are potentially harmful.
    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    c/root/.openclaw/workspace/.venv-openai/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 | Noner0   Query | Noner1   Body | Noner2   '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r3   r.   r/   r0   r1   r2   bodyoptionscast_to)_postr   r   ModerationCreateParamsr   r   r%   r3   r.   r/   r0   r1   r2   s          r&   createzModerations.create0   sl    D zz ""  )?  )+Q[el   -  
 
 	
r(   )r    r!   )r    r)   r3   r4   r.   r5   r/   r6   r0   r7   r1   r8   r2   r9   r    r   
__name__
__module____qualname____doc__r   r'   r,   r   r   rF    r(   r&   r   r      s          0 0 0 _0 6 6 6 _6 59 )-$("&;D/
 /
 /
 /
 /
 /
 /
 /
r(   c                  X    e Zd ZdZedd            Zedd            ZedddedddZ	dS )r   r   r    AsyncModerationsWithRawResponsec                     t          |           S r#   )rO   r$   s    r&   r'   z"AsyncModerations.with_raw_responseg   s     /t444r(   %AsyncModerationsWithStreamingResponsec                     t          |           S r+   )rQ   r$   s    r&   r,   z(AsyncModerations.with_streaming_responseq   s     5T:::r(   Nr-   r3   r4   r.   r5   r/   r6   r0   r7   r1   r8   r2   r9   r   c          
        K   |                      dt          ||dt          j                   d{V t	          ||||          t
                     d{V S )r;   r<   r=   Nr>   r?   )rC   r   r   rD   r   r   rE   s          r&   rF   zAsyncModerations.createz   s      D ZZ,""  )?        )+Q[el   -   
 
 
 
 
 
 
 
 	
r(   )r    rO   )r    rQ   rG   rH   rM   r(   r&   r   r   b   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_wrapperrF   r%   rU   s     r&   __init__z#ModerationsWithRawResponse.__init__   s(    '&>
 
r(   NrU   r   r    rV   rI   rJ   rK   r\   rM   r(   r&   r!   r!      (        
 
 
 
 
 
r(   r!   c                      e Zd ZddZdS )rO   rU   r   r    rV   c                P    || _         t          j        |j                  | _        d S rX   )rY   r   async_to_raw_response_wrapperrF   r[   s     r&   r\   z(AsyncModerationsWithRawResponse.__init__   s(    '&D
 
r(   NrU   r   r    rV   r^   rM   r(   r&   rO   rO      r_   r(   rO   c                      e Zd ZddZdS )r)   rU   r   r    rV   c                F    || _         t          |j                  | _        d S rX   )rY   r   rF   r[   s     r&   r\   z)ModerationsWithStreamingResponse.__init__   s%    '2
 
r(   Nr]   r^   rM   r(   r&   r)   r)      r_   r(   r)   c                      e Zd ZddZdS )rQ   rU   r   r    rV   c                F    || _         t          |j                  | _        d S rX   )rY   r   rF   r[   s     r&   r\   z.AsyncModerationsWithStreamingResponse.__init__   s%    '8
 
r(   Nrc   r^   rM   r(   r&   rQ   rQ      r_   r(   rQ   )-
__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!   rO   r)   rQ   rM   r(   r&   <module>rw      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,
-G
 G
 G
 G
 G
/ G
 G
 G
TG
 G
 G
 G
 G
' G
 G
 G
T
 
 
 
 
 
 
 

 
 
 
 
 
 
 

 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
r(   