
    -2i*                    b   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
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)BodyOmitQueryHeadersNotGivenomit	not_given)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    i/var/www/html/pixcura-vrs/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 | Omitr+   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/   r1   r*   r+   r,   r-   r.   bodyoptionscast_to)_postr   r   GraderRunParamsr   r   r!   r/   r1   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=   )rA   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/   r0   r1   r2   r*   r3   r+   r4   r,   r5   r-   r6   r.   r7   r   r   r/   rE   r+   r4   r,   r5   r-   r6   r.   r7   r   r   
__name__
__module____qualname__r   r#   r(   r   r   rD   rK    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   )rT   r    s    r"   r#   zAsyncGraders.with_raw_response   s     +4000r$   !AsyncGradersWithStreamingResponsec                     t          |           S r'   )rV   r    s    r"   r(   z$AsyncGraders.with_streaming_response   s     1666r$   Nr)   r/   r0   r1   r2   r*   r3   r+   r4   r,   r5   r-   r6   r.   r7   r   c          
        K   |                      dt          |||dt          j                   d{V t	          ||||          t
                     d{V S )r9   r:   r;   Nr<   r=   )rA   r   r   rB   r   r   rC   s           r"   rD   zAsyncGraders.run   s      J ZZ,,$$0  
 "1        )+Q[el   &   
 
 
 
 
 
 
 
 	
r$   r<   rE   r   c          
        K   |                      dt          d|it          j                   d{V t	          ||||          t
                     d{V S )rG   rH   r/   Nr<   r=   )rA   r   r   rI   r   r   rJ   s         r"   rK   zAsyncGraders.validate   s      2 ZZ1,h-?AWAlmmmmmmmm(+Q[el   +   
 
 
 
 
 
 
 
 	
r$   )r   rT   )r   rV   rL   rM   rN   rR   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_wrapperrD   rK   r!   r[   s     r"   __init__zGradersWithRawResponse.__init__   sB    #;K
 
 )@
 
r$   Nr[   r   r   r\   rO   rP   rQ   rb   rR   r$   r"   r   r      (        
 
 
 
 
 
r$   r   c                      e Zd ZddZdS )rT   r[   r   r   r\   c                    || _         t          j        |j                  | _        t          j        |j                  | _        d S r^   )r_   r   async_to_raw_response_wrapperrD   rK   ra   s     r"   rb   z$AsyncGradersWithRawResponse.__init__   sB    #AK
 
 )F
 
r$   Nr[   r   r   r\   rd   rR   r$   r"   rT   rT      re   r$   rT   c                      e Zd ZddZdS )r%   r[   r   r   r\   c                x    || _         t          |j                  | _        t          |j                  | _        d S r^   )r_   r   rD   rK   ra   s     r"   rb   z%GradersWithStreamingResponse.__init__  s<    /K
 
 5
 
r$   Nrc   rd   rR   r$   r"   r%   r%     re   r$   r%   c                      e Zd ZddZdS )rV   r[   r   r   r\   c                x    || _         t          |j                  | _        t          |j                  | _        d S r^   )r_   r   rD   rK   ra   s     r"   rb   z*AsyncGradersWithStreamingResponse.__init__  s<    5K
 
 ;
 
r$   Nri   rd   rR   r$   r"   rV   rV     re   r$   rV   )(
__future__r   httpx r   _typesr   r   r   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   rT   r%   rV   rR   r$   r"   <module>r{      s-   # " " " " "  ! ! ! ! ! ! L L L L L L L L L L L L L L L L L L = = = = = = = = ' ' ' ' ' ' ; ; ; ; ; ; ; ; 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$   