o
    ͩZh*                     @  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
 ddl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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)	NOT_GIVENBodyQueryHeadersNotGiven)maybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)SyncCursorPageAsyncCursorPage)AsyncPaginatormake_request_options)checkpoint_list_params)FineTuningJobCheckpointCheckpointsAsyncCheckpointsc                   @  B   e Zd ZedddZedddZeeddded	dddZdS )r   returnCheckpointsWithRawResponsec                 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   d/var/www/html/lang_env/lib/python3.10/site-packages/openai/resources/fine_tuning/jobs/checkpoints.pywith_raw_response      zCheckpoints.with_raw_response CheckpointsWithStreamingResponsec                 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#Checkpoints.with_streaming_responseNafterlimitextra_headersextra_query
extra_bodytimeoutfine_tuning_job_idstrr(   str | NotGivenr)   int | NotGivenr*   Headers | Noner+   Query | Noner,   Body | Noner-   'float | httpx.Timeout | None | NotGiven'SyncCursorPage[FineTuningJobCheckpoint]c                C  L   |s	t d|| jd| dtt t||||t||dtjdtdS a  
        List checkpoints for a fine-tuning job.

        Args:
          after: Identifier for the last checkpoint ID from the previous pagination request.

          limit: Number of checkpoints to retrieve.

          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
        zAExpected a non-empty value for `fine_tuning_job_id` but received z/fine_tuning/jobs/z/checkpoints)r(   r)   )r*   r+   r,   r-   query)pageoptionsmodel)
ValueError_get_api_listr   r   r   r
   r   CheckpointListParamsr   r.   r(   r)   r*   r+   r,   r-   r   r   r    list,   &   
zCheckpoints.list)r   r   )r   r#   )r.   r/   r(   r0   r)   r1   r*   r2   r+   r3   r,   r4   r-   r5   r   r6   __name__
__module____qualname__r   r!   r%   r   rA   r   r   r   r    r          	c                   @  r   )r   r   AsyncCheckpointsWithRawResponsec                 C  r   r   )rH   r   r   r   r    r!   `   r"   z"AsyncCheckpoints.with_raw_response%AsyncCheckpointsWithStreamingResponsec                 C  r   r$   )rI   r   r   r   r    r%   j   r&   z(AsyncCheckpoints.with_streaming_responseNr'   r.   r/   r(   r0   r)   r1   r*   r2   r+   r3   r,   r4   r-   r5   QAsyncPaginator[FineTuningJobCheckpoint, AsyncCursorPage[FineTuningJobCheckpoint]]c                C  r7   r8   )r=   r>   r   r   r   r
   r   r?   r@   r   r   r    rA   s   rB   zAsyncCheckpoints.list)r   rH   )r   rI   )r.   r/   r(   r0   r)   r1   r*   r2   r+   r3   r,   r4   r-   r5   r   rJ   rC   r   r   r   r    r   _   rG   c                   @     e Zd ZdddZdS )	r   checkpointsr   r   Nonec                 C     || _ t|j| _d S N)_checkpointsr   Zto_raw_response_wrapperrA   r   rL   r   r   r    __init__      
z#CheckpointsWithRawResponse.__init__NrL   r   r   rM   rD   rE   rF   rR   r   r   r   r    r          r   c                   @  rK   )	rH   rL   r   r   rM   c                 C  rN   rO   )rP   r   Zasync_to_raw_response_wrapperrA   rQ   r   r   r    rR      rS   z(AsyncCheckpointsWithRawResponse.__init__NrL   r   r   rM   rU   r   r   r   r    rH      rV   rH   c                   @  rK   )	r#   rL   r   r   rM   c                 C     || _ t|j| _d S rO   )rP   r   rA   rQ   r   r   r    rR         
z)CheckpointsWithStreamingResponse.__init__NrT   rU   r   r   r   r    r#      rV   r#   c                   @  rK   )	rI   rL   r   r   rM   c                 C  rX   rO   )rP   r   rA   rQ   r   r   r    rR      rY   z.AsyncCheckpointsWithStreamingResponse.__init__NrW   rU   r   r   r   r    rI      rV   rI   )&
__future__r   Zhttpx r   _typesr   r   r   r   r	   _utilsr
   _compatr   Z	_resourcer   r   	_responser   r   Z
paginationr   r   Z_base_clientr   r   Ztypes.fine_tuning.jobsr   Z1types.fine_tuning.jobs.fine_tuning_job_checkpointr   __all__r   r   r   rH   r#   rI   r   r   r   r    <module>   s&   GG			