o
    $i*                     @  s  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 deZ"G dd deZ#G dd dZ$G dd dZ%G dd dZ&G d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                   @  V   e Zd Zed ddZed!ddZeddded	d"ddZdddedd#ddZ	dS )$r   returnGradersWithRawResponsec                 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
        )r   self r!   j/var/www/html/flask_server/venv/lib/python3.10/site-packages/openai/resources/fine_tuning/alpha/graders.pywith_raw_response      zGraders.with_raw_responseGradersWithStreamingResponsec                 C  r   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   r!   r!   r"   with_streaming_response       zGraders.with_streaming_responseN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             	   C  s.   | j dt|||dtjt||||dtd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.   r!   r!   r"   run)   s   %zGraders.runr;   grader_validate_params.Graderr   c             	   C  s*   | j dtd|itjt||||dtd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.   r!   r!   r"   validate^   s   zGraders.validate)r   r   )r   r%   r/   r0   r1   r2   r*   r3   r+   r4   r,   r5   r-   r6   r.   r7   r   r   r/   rD   r+   r4   r,   r5   r-   r6   r.   r7   r   r   
__name__
__module____qualname__r   r#   r'   r
   r   rC   rI   r!   r!   r!   r"   r           	;c                   @  r   )$r   r   AsyncGradersWithRawResponsec                 C  r   r   )rQ   r   r!   r!   r"   r#      r$   zAsyncGraders.with_raw_response!AsyncGradersWithStreamingResponsec                 C  r   r&   )rR   r   r!   r!   r"   r'      r(   z$AsyncGraders.with_streaming_responseNr)   r/   r0   r1   r2   r*   r3   r+   r4   r,   r5   r-   r6   r.   r7   r   c             	     s<   | j dt|||dtjI dH t||||dtdI dH S )r8   r9   r:   Nr;   r<   )r@   r   r   rA   r   r   rB   r!   r!   r"   rC      s   %zAsyncGraders.runr;   rD   r   c             	     s8   | j dtd|itjI dH t||||dtdI dH S )rE   rF   r/   Nr;   r<   )r@   r   r   rG   r   r   rH   r!   r!   r"   rI      s   zAsyncGraders.validate)r   rQ   )r   rR   rJ   rK   rL   r!   r!   r!   r"   r      rP   c                   @     e Zd ZdddZdS )	r   gradersr   r   Nonec                 C  &   || _ t|j| _t|j| _d S N)_gradersr   to_raw_response_wrapperrC   rI   r    rT   r!   r!   r"   __init__      
zGradersWithRawResponse.__init__NrT   r   r   rU   rM   rN   rO   r[   r!   r!   r!   r"   r          r   c                   @  rS   )	rQ   rT   r   r   rU   c                 C  rV   rW   )rX   r   async_to_raw_response_wrapperrC   rI   rZ   r!   r!   r"   r[      r\   z$AsyncGradersWithRawResponse.__init__NrT   r   r   rU   r^   r!   r!   r!   r"   rQ      r_   rQ   c                   @  rS   )	r%   rT   r   r   rU   c                 C  "   || _ t|j| _t|j| _d S rW   )rX   r   rC   rI   rZ   r!   r!   r"   r[        
z%GradersWithStreamingResponse.__init__Nr]   r^   r!   r!   r!   r"   r%     r_   r%   c                   @  rS   )	rR   rT   r   r   rU   c                 C  rb   rW   )rX   r   rC   rI   rZ   r!   r!   r"   r[     rc   z*AsyncGradersWithStreamingResponse.__init__Nra   r^   r!   r!   r!   r"   rR     r_   rR   )(
__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   rQ   r%   rR   r!   r!   r!   r"   <module>   s&   $ll