
    f j                    ^   d dl mZ d dlmZmZ d dlmZ d dlZddlm	Z	 ddl
mZ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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)ListUnion)LiteralN   )_legacy_response)ModerationCreateResponse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ModerationsAsyncModerationsc                  T    e Zd Zedd            Zedd            ZedddedddZdS )r   returnModerationsWithRawResponsec                     t          |           S N)r   selfs    pC:\Users\Terasoftware\OneDrive\Desktop\faahhh\fyndo\fyndo\venv\Lib\site-packages\openai/resources/moderations.pywith_raw_responsezModerations.with_raw_response   s    )$///     ModerationsWithStreamingResponsec                     t          |           S r   )r$   r   s    r!   with_streaming_responsez#Moderations.with_streaming_response    s    /555r#   Nmodelextra_headersextra_query
extra_bodytimeoutinputUnion[str, List[str]]r(   RUnion[str, Literal['text-moderation-latest', 'text-moderation-stable']] | NotGivenr)   Headers | Noner*   Query | Noner+   Body | Noner,   'float | httpx.Timeout | None | NotGivenr	   c          
         |                      dt          ||dt          j                  t	          ||||          t
                    S )  
        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r-   r(   r)   r*   r+   r,   bodyoptionscast_to)_postr   r
   ModerationCreateParamsr   r	   r    r-   r(   r)   r*   r+   r,   s          r!   createzModerations.create$   sl    F zz ""  )?  )+Q[el   -  
 
 	
r#   )r   r   )r   r$   r-   r.   r(   r/   r)   r0   r*   r1   r+   r2   r,   r3   r   r	   __name__
__module____qualname__r   r"   r&   r   r@    r#   r!   r   r      s        0 0 0 _0 6 6 6 _6 en )-$("&;D0
 0
 0
 0
 0
 0
 0
 0
r#   c                  T    e Zd Zedd            Zedd            ZedddedddZdS )r   r   AsyncModerationsWithRawResponsec                     t          |           S r   )rH   r   s    r!   r"   z"AsyncModerations.with_raw_responseX   s    .t444r#   %AsyncModerationsWithStreamingResponsec                     t          |           S r   )rJ   r   s    r!   r&   z(AsyncModerations.with_streaming_response\   s    4T:::r#   Nr'   r-   r.   r(   r/   r)   r0   r*   r1   r+   r2   r,   r3   r	   c          
        K   |                      dt          ||dt          j                   d{V t	          ||||          t
                     d{V S )r5   r6   r7   Nr8   r9   )r=   r   r
   r>   r   r	   r?   s          r!   r@   zAsyncModerations.create`   s      F ZZ,""  )?        )+Q[el   -   
 
 
 
 
 
 
 
 	
r#   )r   rH   )r   rJ   rA   rB   rF   r#   r!   r   r   W   s        5 5 5 _5 ; ; ; _; en )-$("&;D0
 0
 0
 0
 0
 0
 0
 0
r#   c                      e Zd ZddZdS )r   moderationsr   r   Nonec                P    || _         t          j        |j                  | _        d S r   )_moderationsr   to_raw_response_wrapperr@   r    rN   s     r!   __init__z#ModerationsWithRawResponse.__init__   s(    '&>
 
r#   NrN   r   r   rO   rC   rD   rE   rT   rF   r#   r!   r   r      (        
 
 
 
 
 
r#   r   c                      e Zd ZddZdS )rH   rN   r   r   rO   c                P    || _         t          j        |j                  | _        d S r   )rQ   r   async_to_raw_response_wrapperr@   rS   s     r!   rT   z(AsyncModerationsWithRawResponse.__init__   s(    '&D
 
r#   NrN   r   r   rO   rV   rF   r#   r!   rH   rH      rW   r#   rH   c                      e Zd ZddZdS )r$   rN   r   r   rO   c                F    || _         t          |j                  | _        d S r   )rQ   r   r@   rS   s     r!   rT   z)ModerationsWithStreamingResponse.__init__   s%    '2
 
r#   NrU   rV   rF   r#   r!   r$   r$      rW   r#   r$   c                      e Zd ZddZdS )rJ   rN   r   r   rO   c                F    || _         t          |j                  | _        d S r   )rQ   r   r@   rS   s     r!   rT   z.AsyncModerationsWithStreamingResponse.__init__   s%    '8
 
r#   Nr[   rV   rF   r#   r!   rJ   rJ      rW   r#   rJ   )'
__future__r   typingr   r   typing_extensionsr   httpx r   typesr	   r
   _typesr   r   r   r   r   _utilsr   r   _compatr   	_resourcer   r   	_responser   r   _base_clientr   __all__r   r   r   rH   r$   rJ   rF   r#   r!   <module>rm      s8   # " " " " "         % % % % % %        F F F F F F F F > > > > > > > > > > > > > >        & % % % % % 9 9 9 9 9 9 9 9 X X X X X X X X      ,
-9
 9
 9
 9
 9
/ 9
 9
 9
x9
 9
 9
 9
 9
' 9
 9
 9
x
 
 
 
 
 
 
 

 
 
 
 
 
 
 

 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
r#   