
    Yj#                    H   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 ddlmZmZmZmZmZmZ dd	l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  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)MappingcastN   )_legacy_response)&content_provenance_check_create_params)deepcopy_with_paths)BodyQueryHeadersNotGiven	FileTypes	not_given)extract_filesmaybe_transformasync_maybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)make_request_options)ContentProvenanceCheckContentProvenanceChecksAsyncContentProvenanceChecksc                  Z    e Zd Zedd       Zedd       Z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
        )&ContentProvenanceChecksWithRawResponseselfs    i/var/www/html/vmm-quimica/venv/lib/python3.12/site-packages/openai/resources/content_provenance_checks.pywith_raw_responsez)ContentProvenanceChecks.with_raw_response   s     6d;;    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
        ),ContentProvenanceChecksWithStreamingResponser    s    r"   with_streaming_responsez/ContentProvenanceChecks.with_streaming_response"   s     <DAAr$   Nextra_headersextra_query
extra_bodytimeoutc                  t        d|idgg      }t        t        t        t        t
        f   |      dgg      }ddi|xs i }| j                  dt        |t        j                        |t        ||||ddi      t        	      S )
  
        Check whether an image or audio file contains known OpenAI provenance signals.
        [Learn more about content provenance](/api/docs/guides/content-provenance).

        If `not_detected`, it means the tool did not find supported signals in the
        uploaded file. The content could still have been generated by OpenAI if the
        metadata was stripped or has evidence of tampering, the watermark was degraded,
        it comes from a legacy generation model, or it was created before provenance
        signals were available. Content could also still be AI-generated by another
        company's model, which the tool currently does not detect.

        Args:
          file: The image or audio file to check for supported OpenAI provenance signals.

          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
        filepathsContent-Typemultipart/form-data/content_provenance_checksbearer_authTr*   r+   r,   r-   securitybodyfilesoptionscast_to)r	   r   r   r   strobject_postr   r   "ContentProvenanceCheckCreateParamsr   r   r!   r0   r*   r+   r,   r-   r:   r;   s           r"   createzContentProvenanceChecks.create+   s    B #FD>VH:>d73;#7>xjQ ()>X=CVTVXzz( 'M'p'pq(+'%'. +  
 	
r$   )returnr   )rD   r'   r0   r   r*   zHeaders | Noner+   zQuery | Noner,   zBody | Noner-   z(float | httpx2.Timeout | None | NotGivenrD   r   __name__
__module____qualname__r   r#   r(   r   rC    r$   r"   r   r      sy    < < B B )-$("&<E3
 3
 &3
 "3
  3
 :3
 
 3
r$   c                  Z    e Zd Zedd       Zedd       Zddded	 	 	 	 	 	 	 	 	 	 	 ddZy)	r   c                    t        |       S r   )+AsyncContentProvenanceChecksWithRawResponser    s    r"   r#   z.AsyncContentProvenanceChecks.with_raw_responseb   s     ;4@@r$   c                    t        |       S r&   )1AsyncContentProvenanceChecksWithStreamingResponser    s    r"   r(   z4AsyncContentProvenanceChecks.with_streaming_responsel   s     AFFr$   Nr)   c               >  K   t        d|idgg      }t        t        t        t        t
        f   |      dgg      }ddi|xs i }| j                  dt        |t        j                         d{   |t        ||||ddi	      t        
       d{   S 7 (7 w)r/   r0   r1   r3   r4   r5   Nr6   Tr7   r9   )r	   r   r   r   r>   r?   r@   r   r   rA   r   r   rB   s           r"   rC   z#AsyncContentProvenanceChecks.createu   s     B #FD>VH:>d73;#7>xjQ ()>X=CVTVXZZ(,<__  (+'%'. +   
 
 	

s$   A.B0B
1#BBBB)rD   rM   )rD   rO   rE   rF   rJ   r$   r"   r   r   a   s{    A A G G )-$("&<E5
 5
 &5
 "5
  5
 :5
 
 5
r$   c                      e Zd ZddZy)r   c                Z    || _         t        j                  |j                        | _        y N)_content_provenance_checksr   to_raw_response_wrapperrC   r!   content_provenance_checkss     r"   __init__z/ContentProvenanceChecksWithRawResponse.__init__   s%    *C'&>>%,,
r$   NrW   r   rD   NonerG   rH   rI   rX   rJ   r$   r"   r   r          
r$   r   c                      e Zd ZddZy)rM   c                Z    || _         t        j                  |j                        | _        y rS   )rT   r   async_to_raw_response_wrapperrC   rV   s     r"   rX   z4AsyncContentProvenanceChecksWithRawResponse.__init__   s%    *C'&DD%,,
r$   NrW   r   rD   rZ   r[   rJ   r$   r"   rM   rM      r\   r$   rM   c                      e Zd ZddZy)r'   c                F    || _         t        |j                        | _        y rS   )rT   r   rC   rV   s     r"   rX   z5ContentProvenanceChecksWithStreamingResponse.__init__   s    *C'2%,,
r$   NrY   r[   rJ   r$   r"   r'   r'      r\   r$   r'   c                      e Zd ZddZy)rO   c                F    || _         t        |j                        | _        y rS   )rT   r   rC   rV   s     r"   rX   z:AsyncContentProvenanceChecksWithStreamingResponse.__init__   s    *C'8%,,
r$   Nr`   r[   rJ   r$   r"   rO   rO      r\   r$   rO   )*
__future__r   typingr   r   httpx2 r   typesr   _filesr	   _typesr
   r   r   r   r   r   _utilsr   r   r   _compatr   	_resourcer   r   	_responser   r   _base_clientr   types.content_provenance_checkr   __all__r   r   r   rM   r'   rO   rJ   r$   r"   <module>rs      s    #     : ( I I J J % 9 X / C$&D
EG
o G
TI
#3 I
X
 

 

 

 
r$   