
    zvh*                    4   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%y)    )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                      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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
        )GradersWithRawResponseselfs    b/var/www/html/luna/venv/lib/python3.12/site-packages/openai/resources/fine_tuning/alpha/graders.pywith_raw_responsezGraders.with_raw_response   s     &d++    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
        )GradersWithStreamingResponser   s    r   with_streaming_responsezGraders.with_streaming_response    s     ,D11r!   Nitemextra_headersextra_query
extra_bodytimeoutc          
         | j                  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gradermodel_sampler'   r(   r)   r*   r+   bodyoptionscast_to)_postr   r   GraderRunParamsr   r   r   r0   r1   r'   r(   r)   r*   r+   s           r   runzGraders.run)   sY    J zz, $$0 
 "11 )+Q[el &  
 	
r!   r2   c          
         | j                  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/validater0   r2   r3   )r7   r   r   GraderValidateParamsr   r   r   r0   r(   r)   r*   r+   s         r   validatezGraders.validate^   sK    2 zz1 (F!35K5`5`a(+Q[el +  
 	
r!   )returnr   )rA   r$   r0   zgrader_run_params.Graderr1   strr'   zobject | NotGivenr(   Headers | Noner)   Query | Noner*   Body | Noner+   'float | httpx.Timeout | None | NotGivenrA   r   r0   zgrader_validate_params.Graderr(   rD   r)   rE   r*   rF   r+   rG   rA   r   	__name__
__module____qualname__r   r    r%   r   r:   r@    r!   r   r   r      s    , , 2 2 #, )-$("&;D3
 )3
 	3

  3
 &3
 "3
  3
 93
 
3
v )-$("&;D 
 . 
 & 
 " 
   
 9 
 
  
r!   c                      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y)r   c                    t        |       S r   )AsyncGradersWithRawResponser   s    r   r    zAsyncGraders.with_raw_response   s     +400r!   c                    t        |       S r#   )!AsyncGradersWithStreamingResponser   s    r   r%   z$AsyncGraders.with_streaming_response   s     166r!   Nr&   c          
        K   | j                  dt        |||dt        j                         d{   t	        ||||      t
               d{   S 7 $7 w)r-   r.   r/   Nr2   r3   )r7   r   r   r8   r   r   r9   s           r   r:   zAsyncGraders.run   sr     J ZZ,,$$0 
 "11  )+Q[el &   
 
 	

s!   .AA
AAAAr2   c          
        K   | j                  dt        d|it        j                         d{   t	        ||||      t
               d{   S 7 $7 w)r<   r=   r0   Nr2   r3   )r7   r   r   r>   r   r   r?   s         r   r@   zAsyncGraders.validate   s`     2 ZZ1,h-?AWAlAlmm(+Q[el +   
 
 	
m
s!   ,AA
AAAA)rA   rP   )rA   rR   rB   rH   rI   rM   r!   r   r   r      s    1 1 7 7 #, )-$("&;D3
 )3
 	3

  3
 &3
 "3
  3
 93
 
3
v )-$("&;D 
 . 
 & 
 " 
   
 9 
 
  
r!   c                      e Zd ZddZy)r   c                    || _         t        j                  |j                        | _        t        j                  |j                        | _        y N)_gradersr   to_raw_response_wrapperr:   r@   r   graderss     r   __init__zGradersWithRawResponse.__init__   s?    #;;KK
 )@@
r!   Nr[   r   rA   NonerJ   rK   rL   r\   rM   r!   r   r   r          
r!   r   c                      e Zd ZddZy)rP   c                    || _         t        j                  |j                        | _        t        j                  |j                        | _        y rW   )rX   r   async_to_raw_response_wrapperr:   r@   rZ   s     r   r\   z$AsyncGradersWithRawResponse.__init__   s?    #AAKK
 )FF
r!   Nr[   r   rA   r^   r_   rM   r!   r   rP   rP      r`   r!   rP   c                      e Zd ZddZy)r$   c                z    || _         t        |j                        | _        t        |j                        | _        y rW   )rX   r   r:   r@   rZ   s     r   r\   z%GradersWithStreamingResponse.__init__  s3    /KK
 5
r!   Nr]   r_   rM   r!   r   r$   r$     r`   r!   r$   c                      e Zd ZddZy)rR   c                z    || _         t        |j                        | _        t        |j                        | _        y rW   )rX   r   r:   r@   rZ   s     r   r\   z*AsyncGradersWithStreamingResponse.__init__  s3    5KK
 ;
r!   Nrd   r_   rM   r!   r   rR   rR     r`   r!   rR   )&
__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   rP   r$   rR   rM   r!   r   <module>rv      s    #  ! @ @ = ' ; Z 1 Q M Wn
%i
o i
Xi
# i
X	
 	
	
 	
	
 	
	
 	
r!   