o
    Cji                     @  s   d dl mZ d dlmZmZmZ d dlmZ d dl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 dd	lmZmZ dd
lmZmZ ddlmZ erVddlmZ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#dS )    )annotations)TYPE_CHECKINGListUnion)LiteralN   )ModerationCreateResponsemoderation_create_params)	NOT_GIVENBodyQueryHeadersNotGiven)maybe_transform)SyncAPIResourceAsyncAPIResource)to_raw_response_wrapperasync_to_raw_response_wrapper)make_request_options)OpenAIAsyncOpenAIModerationsAsyncModerationsc                      @   e Zd ZU ded< d fddZed	d	d	ed
dddZ  ZS )r   ModerationsWithRawResponsewith_raw_responseclientr   returnNonec                      t  | t| | _d S N)super__init__r   r   selfr   	__class__ s/var/www/html/Resume-Parser/resume-parser-inhouse/venv/lib/python3.10/site-packages/openai/resources/moderations.pyr"         zModerations.__init__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             	   C  s,   | j dt||dtjt||||dtdS )  
        Classifies if text violates OpenAI's Content Policy

        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r0   r+   r,   r-   r.   r/   bodyoptionscast_to_postr   r	   ModerationCreateParamsr   r   r$   r0   r+   r,   r-   r.   r/   r'   r'   r(   create   s   #zModerations.create)r   r   r   r   r0   r1   r+   r2   r,   r3   r-   r4   r.   r5   r/   r6   r   r   __name__
__module____qualname____annotations__r"   r
   rC   __classcell__r'   r'   r%   r(   r         
 c                      r   )r   AsyncModerationsWithRawResponser   r   r   r   r   c                   r   r    )r!   r"   rL   r   r#   r%   r'   r(   r"   T   r)   zAsyncModerations.__init__Nr*   r0   r1   r+   r2   r,   r3   r-   r4   r.   r5   r/   r6   r   c             	     s4   | j dt||dtjt||||dtdI dH S )r7   r8   r9   r:   r;   Nr?   rB   r'   r'   r(   rC   X   s   #zAsyncModerations.create)r   r   r   r   rD   rE   r'   r'   r%   r(   r   Q   rK   c                   @     e Zd ZdddZdS )	r   moderationsr   r   r   c                 C     t |j| _d S r    )r   rC   r$   rN   r'   r'   r(   r"         
z#ModerationsWithRawResponse.__init__N)rN   r   r   r   rF   rG   rH   r"   r'   r'   r'   r(   r          r   c                   @  rM   )	rL   rN   r   r   r   c                 C  rO   r    )r   rC   rP   r'   r'   r(   r"      rQ   z(AsyncModerationsWithRawResponse.__init__N)rN   r   r   r   rR   r'   r'   r'   r(   rL      rS   rL   )$
__future__r   typingr   r   r   typing_extensionsr   httpxtypesr   r	   _typesr
   r   r   r   r   _utilsr   	_resourcer   r   	_responser   r   _base_clientr   _clientr   r   __all__r   r   r   rL   r'   r'   r'   r(   <module>   s"   ::