o
    +if                     @  s  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 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gZ!G dd deZ"G dd deZ#G dd dZ$G dd dZ%G dd dZ&G dd dZ'dS )    )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                   @  @   e Zd ZedddZedddZeddded	dddZdS )r   returnModerationsWithRawResponsec                 C     t | S N)r   self r    U/var/www/html/corbot_env/lib/python3.10/site-packages/openai/resources/moderations.pywith_raw_response      zModerations.with_raw_response ModerationsWithStreamingResponsec                 C  r   r   )r$   r   r    r    r!   with_streaming_response!   r#   z#Moderations.with_streaming_responseN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             	   C  s,   | j dt||dtjt||||dtd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+   r    r    r!   create%   s   #zModerations.create)r   r   )r   r$   r,   r-   r'   r.   r(   r/   r)   r0   r*   r1   r+   r2   r   r   __name__
__module____qualname__r   r"   r%   r	   r>   r    r    r    r!   r          c                   @  r   )r   r   AsyncModerationsWithRawResponsec                 C  r   r   )rE   r   r    r    r!   r"   Y   r#   z"AsyncModerations.with_raw_response%AsyncModerationsWithStreamingResponsec                 C  r   r   )rF   r   r    r    r!   r%   ]   r#   z(AsyncModerations.with_streaming_responseNr&   r,   r-   r'   r.   r(   r/   r)   r0   r*   r1   r+   r2   r   c             	     s:   | j dt||dtjI dH t||||dtdI dH S )r3   r4   r5   Nr6   r7   )r;   r   r   r<   r   r   r=   r    r    r!   r>   a   s   #zAsyncModerations.create)r   rE   )r   rF   r?   r@   r    r    r    r!   r   X   rD   c                   @     e Zd ZdddZdS )	r   moderationsr   r   Nonec                 C     || _ t|j| _d S r   )_moderationsr   to_raw_response_wrapperr>   r   rH   r    r    r!   __init__      
z#ModerationsWithRawResponse.__init__NrH   r   r   rI   rA   rB   rC   rN   r    r    r    r!   r          r   c                   @  rG   )	rE   rH   r   r   rI   c                 C  rJ   r   )rK   r   async_to_raw_response_wrapperr>   rM   r    r    r!   rN      rO   z(AsyncModerationsWithRawResponse.__init__NrH   r   r   rI   rQ   r    r    r    r!   rE      rR   rE   c                   @  rG   )	r$   rH   r   r   rI   c                 C     || _ t|j| _d S r   )rK   r   r>   rM   r    r    r!   rN         
z)ModerationsWithStreamingResponse.__init__NrP   rQ   r    r    r    r!   r$      rR   r$   c                   @  rG   )	rF   rH   r   r   rI   c                 C  rU   r   )rK   r   r>   rM   r    r    r!   rN      rV   z.AsyncModerationsWithStreamingResponse.__init__NrT   rQ   r    r    r    r!   rF      rR   rF   )(
__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   rE   r$   rF   r    r    r    r!   <module>   s(   <<			