
    .h                    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                  `    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 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/html/axiom-chatbot/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/   r0   bodyoptionscast_to)_postr   r   ModerationCreateParamsr   r   r#   r5   r,   r-   r.   r/   r0   s          r$   createzModerations.create,   sV    D zz "" )?? )+Q[el -  
 	
r&   )returnr!   )r?   r)   r5   zIUnion[str, SequenceNotStr[str], Iterable[ModerationMultiModalInputParam]]r,   z"Union[str, ModerationModel] | Omitr-   zHeaders | Noner.   zQuery | Noner/   zBody | Noner0   z'float | httpx.Timeout | None | NotGivenr?   r   	__name__
__module____qualname__r   r%   r*   r   r   r>    r&   r$   r   r      s    0 0 6 6 59 )-$("&;D/
 Y/
 2	/
 &/
 "/
  /
 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_response_   s     /t44r&   c                    t        |       S r(   )%AsyncModerationsWithStreamingResponser"   s    r$   r*   z(AsyncModerations.with_streaming_responsei   s     5T::r&   Nr+   c          
        K   | j                  dt        ||dt        j                         d{   t	        ||||      t
               d{   S 7 $7 w)r2   r3   r4   Nr6   r7   )r;   r   r   r<   r   r   r=   s          r$   r>   zAsyncModerations.creater   so     D ZZ,"" )??  )+Q[el -   
 
 	

s!   -AA
AAAA)r?   rH   )r?   rJ   r@   rA   rE   r&   r$   r   r   ^   s    5 5 ; ; 59 )-$("&;D/
 Y/
 2	/
 &/
 "/
  /
 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rR   r   r?   NonerB   rC   rD   rS   rE   r&   r$   r!   r!          
r&   r!   c                      e Zd ZddZy)rH   c                Z    || _         t        j                  |j                        | _        y rN   )rO   r   async_to_raw_response_wrapperr>   rQ   s     r$   rS   z(AsyncModerationsWithRawResponse.__init__   s%    '&DD
r&   NrR   r   r?   rU   rV   rE   r&   r$   rH   rH      rW   r&   rH   c                      e Zd ZddZy)r)   c                F    || _         t        |j                        | _        y rN   )rO   r   r>   rQ   s     r$   rS   z)ModerationsWithStreamingResponse.__init__   s    '2
r&   NrT   rV   rE   r&   r$   r)   r)      rW   r&   r)   c                      e Zd ZddZy)rJ   c                F    || _         t        |j                        | _        y rN   )rO   r   r>   rQ   s     r$   rS   z.AsyncModerationsWithStreamingResponse.__init__   s    '8
r&   Nr[   rV   rE   r&   r$   rJ   rJ      rW   r&   rJ   )-
__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!   rH   r)   rJ   rE   r&   r$   <module>ro      s    # "   , Z Z Z ; % 9 X / 4 G U,
-C
/ C
LC
' C
L
 

 

 

 
r&   