
    	h*                    Z   d dl mZ d dl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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%dS )    )annotationsN   )_legacy_response)	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)grader_run_paramsgrader_validate_params)GraderRunResponse)GraderValidateResponseGradersAsyncGradersc                  h    e Zd Zedd            Zedd            ZedddedddZdddedddZdS ) r   returnGradersWithRawResponsec                     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
        )r   selfs    w/var/www/html/web-builder-api.evdpl.com/venv/lib/python3.11/site-packages/openai/resources/fine_tuning/alpha/graders.pywith_raw_responsezGraders.with_raw_response   s     &d+++    GradersWithStreamingResponsec                     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
        )r#   r   s    r    with_streaming_responsezGraders.with_streaming_response    s     ,D111r"   Nitemextra_headersextra_query
extra_bodytimeoutgradergrader_run_params.Gradermodel_samplestrr(   object | NotGivenr)   Headers | Noner*   Query | Noner+   Body | Noner,   'float | httpx.Timeout | None | NotGivenr   c          
         |                      dt          |||dt          j                  t	          ||||          t
                    S )  
        Run a grader.

        Args:
          grader: The grader used for the fine-tuning job.

          model_sample: The model sample to be evaluated. This value will be used to populate the
              `sample` namespace. See
              [the guide](https://platform.openai.com/docs/guides/graders) for more details.
              The `output_json` variable will be populated if the model sample is a valid JSON
              string.

          item: The dataset item provided to the grader. This will be used to populate the
              `item` namespace. See
              [the guide](https://platform.openai.com/docs/guides/graders) for more details.

          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
        /fine_tuning/alpha/graders/runr-   r/   r(   r)   r*   r+   r,   bodyoptionscast_to)_postr   r   GraderRunParamsr   r   r   r-   r/   r(   r)   r*   r+   r,   s           r    runzGraders.run)   so    J zz, $$0  
 "1  )+Q[el   &  
 
 	
r"   r:   grader_validate_params.Graderr   c          
         |                      dt          d|it          j                  t	          ||||          t
                    S )  
        Validate a grader.

        Args:
          grader: The grader used for the fine-tuning job.

          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
        #/fine_tuning/alpha/graders/validater-   r:   r;   )r?   r   r   GraderValidateParamsr   r   r   r-   r)   r*   r+   r,   s         r    validatezGraders.validate^   sZ    2 zz1 (F!35K5`aa(+Q[el   +  
 
 	
r"   )r   r   )r   r#   r-   r.   r/   r0   r(   r1   r)   r2   r*   r3   r+   r4   r,   r5   r   r   r-   rC   r)   r2   r*   r3   r+   r4   r,   r5   r   r   	__name__
__module____qualname__r   r!   r&   r   rB   rI    r"   r    r   r      s        , , , _, 2 2 2 _2 #, )-$("&;D3
 3
 3
 3
 3
 3
v )-$("&;D 
  
  
  
  
  
  
  
r"   c                  h    e Zd Zedd            Zedd            ZedddedddZdddedddZdS ) r   r   AsyncGradersWithRawResponsec                     t          |           S r   )rR   r   s    r    r!   zAsyncGraders.with_raw_response   s     +4000r"   !AsyncGradersWithStreamingResponsec                     t          |           S r%   )rT   r   s    r    r&   z$AsyncGraders.with_streaming_response   s     1666r"   Nr'   r-   r.   r/   r0   r(   r1   r)   r2   r*   r3   r+   r4   r,   r5   r   c          
        K   |                      dt          |||dt          j                   d{V t	          ||||          t
                     d{V S )r7   r8   r9   Nr:   r;   )r?   r   r   r@   r   r   rA   s           r    rB   zAsyncGraders.run   s      J ZZ,,$$0  
 "1        )+Q[el   &   
 
 
 
 
 
 
 
 	
r"   r:   rC   r   c          
        K   |                      dt          d|it          j                   d{V t	          ||||          t
                     d{V S )rE   rF   r-   Nr:   r;   )r?   r   r   rG   r   r   rH   s         r    rI   zAsyncGraders.validate   s      2 ZZ1,h-?AWAlmmmmmmmm(+Q[el   +   
 
 
 
 
 
 
 
 	
r"   )r   rR   )r   rT   rJ   rK   rL   rP   r"   r    r   r      s        1 1 1 _1 7 7 7 _7 #, )-$("&;D3
 3
 3
 3
 3
 3
v )-$("&;D 
  
  
  
  
  
  
  
r"   c                      e Zd ZddZdS )r   gradersr   r   Nonec                    || _         t          j        |j                  | _        t          j        |j                  | _        d S N)_gradersr   to_raw_response_wrapperrB   rI   r   rY   s     r    __init__zGradersWithRawResponse.__init__   sB    #;K
 
 )@
 
r"   NrY   r   r   rZ   rM   rN   rO   r`   rP   r"   r    r   r      (        
 
 
 
 
 
r"   r   c                      e Zd ZddZdS )rR   rY   r   r   rZ   c                    || _         t          j        |j                  | _        t          j        |j                  | _        d S r\   )r]   r   async_to_raw_response_wrapperrB   rI   r_   s     r    r`   z$AsyncGradersWithRawResponse.__init__   sB    #AK
 
 )F
 
r"   NrY   r   r   rZ   rb   rP   r"   r    rR   rR      rc   r"   rR   c                      e Zd ZddZdS )r#   rY   r   r   rZ   c                x    || _         t          |j                  | _        t          |j                  | _        d S r\   )r]   r   rB   rI   r_   s     r    r`   z%GradersWithStreamingResponse.__init__  s<    /K
 
 5
 
r"   Nra   rb   rP   r"   r    r#   r#     rc   r"   r#   c                      e Zd ZddZdS )rT   rY   r   r   rZ   c                x    || _         t          |j                  | _        t          |j                  | _        d S r\   )r]   r   rB   rI   r_   s     r    r`   z*AsyncGradersWithStreamingResponse.__init__  s<    5K
 
 ;
 
r"   Nrg   rb   rP   r"   r    rT   rT     rc   r"   rT   )&
__future__r   httpx r   _typesr   r   r   r	   r
   _utilsr   r   _compatr   	_resourcer   r   	_responser   r   _base_clientr   types.fine_tuning.alphar   r   +types.fine_tuning.alpha.grader_run_responser   0types.fine_tuning.alpha.grader_validate_responser   __all__r   r   r   rR   r#   rT   rP   r"   r    <module>ry      s!   # " " " " "  ! ! ! ! ! ! @ @ @ @ @ @ @ @ @ @ @ @ @ @ = = = = = = = = ' ' ' ' ' ' ; ; ; ; ; ; ; ; Z Z Z Z Z Z Z Z 1 1 1 1 1 1 Q Q Q Q Q Q Q Q M M M M M M W W W W W Wn
%i
 i
 i
 i
 i
o i
 i
 i
Xi
 i
 i
 i
 i
# i
 i
 i
X	
 	
 	
 	
 	
 	
 	
 	
	
 	
 	
 	
 	
 	
 	
 	
	
 	
 	
 	
 	
 	
 	
 	
	
 	
 	
 	
 	
 	
 	
 	
 	
 	
r"   