
    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 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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)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                  Z    e Zd ZdZedd            Zedd            ZeedddedddZ	dS )r   IManage fine-tuning jobs to tailor a model to your specific training data.returnCheckpointsWithRawResponsec                     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    t/root/.openclaw/workspace/.venv-openai/lib/python3.11/site-packages/openai/resources/fine_tuning/jobs/checkpoints.pywith_raw_responsezCheckpoints.with_raw_response   s     *$///     CheckpointsWithStreamingResponsec                     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#Checkpoints.with_streaming_response%   s     0555r%   Nafterlimitextra_headersextra_query
extra_bodytimeoutfine_tuning_job_idstrr+   
str | Omitr,   
int | Omitr-   Headers | Noner.   Query | Noner/   Body | Noner0   'float | httpx.Timeout | None | NotGiven'SyncCursorPage[FineTuningJobCheckpoint]c                   |st          d|          |                     d| dt          t                   t	          ||||t          ||dt          j                            t                    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/   r0   query)pageoptionsmodel)
ValueError_get_api_listr   r   r   r   r   CheckpointListParamsr"   r1   r+   r,   r-   r.   r/   r0   s           r#   listzCheckpoints.list.   s    : " 	ywaswwxxx!!A!3AAA 78(+'%%!&!&  +?    *! " 
 
 	
r%   )r   r   )r   r&   )r1   r2   r+   r3   r,   r4   r-   r5   r.   r6   r/   r7   r0   r8   r   r9   
__name__
__module____qualname____doc__r   r$   r)   r   r   rD    r%   r#   r   r      s        SS0 0 0 _0 6 6 6 _6 !  )-$("&;D0
 0
 0
 0
 0
 0
 0
 0
r%   c                  Z    e Zd ZdZedd            Zedd            ZeedddedddZ	dS )r   r   r   AsyncCheckpointsWithRawResponsec                     t          |           S r    )rL   r!   s    r#   r$   z"AsyncCheckpoints.with_raw_responsed   s     /t444r%   %AsyncCheckpointsWithStreamingResponsec                     t          |           S r(   )rN   r!   s    r#   r)   z(AsyncCheckpoints.with_streaming_responsen   s     5T:::r%   Nr*   r1   r2   r+   r3   r,   r4   r-   r5   r.   r6   r/   r7   r0   r8   QAsyncPaginator[FineTuningJobCheckpoint, AsyncCursorPage[FineTuningJobCheckpoint]]c                   |st          d|          |                     d| dt          t                   t	          ||||t          ||dt          j                            t                    S r;   )r@   rA   r   r   r   r   r   rB   rC   s           r#   rD   zAsyncCheckpoints.listw   s    : " 	ywaswwxxx!!A!3AAA !89(+'%%!&!&  +?    *! " 
 
 	
r%   )r   rL   )r   rN   )r1   r2   r+   r3   r,   r4   r-   r5   r.   r6   r/   r7   r0   r8   r   rP   rE   rJ   r%   r#   r   r   a   s        SS5 5 5 _5 ; ; ; _; !  )-$("&;D0
 0
 0
 0
 0
 0
 0
 0
r%   c                      e Zd ZddZdS )r   checkpointsr   r   Nonec                P    || _         t          j        |j                  | _        d S N)_checkpointsr   to_raw_response_wrapperrD   r"   rS   s     r#   __init__z#CheckpointsWithRawResponse.__init__   s(    '$<
 
			r%   NrS   r   r   rT   rF   rG   rH   rZ   rJ   r%   r#   r   r      (        
 
 
 
 
 
r%   r   c                      e Zd ZddZdS )rL   rS   r   r   rT   c                P    || _         t          j        |j                  | _        d S rV   )rW   r   async_to_raw_response_wrapperrD   rY   s     r#   rZ   z(AsyncCheckpointsWithRawResponse.__init__   s(    '$B
 
			r%   NrS   r   r   rT   r\   rJ   r%   r#   rL   rL      r]   r%   rL   c                      e Zd ZddZdS )r&   rS   r   r   rT   c                F    || _         t          |j                  | _        d S rV   )rW   r   rD   rY   s     r#   rZ   z)CheckpointsWithStreamingResponse.__init__   s%    '0
 
			r%   Nr[   r\   rJ   r%   r#   r&   r&      r]   r%   r&   c                      e Zd ZddZdS )rN   rS   r   r   rT   c                F    || _         t          |j                  | _        d S rV   )rW   r   rD   rY   s     r#   rZ   z.AsyncCheckpointsWithStreamingResponse.__init__   s%    '6
 
			r%   Nra   r\   rJ   r%   r#   rN   rN      r]   r%   rN   )(
__future__r   httpx r   _typesr   r   r   r	   r
   r   r   _utilsr   _compatr   	_resourcer   r   	_responser   r   
paginationr   r   _base_clientr   r   types.fine_tuning.jobsr   1types.fine_tuning.jobs.fine_tuning_job_checkpointr   __all__r   r   r   rL   r&   rN   rJ   r%   r#   <module>rs      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 : : : : : : : :        > = = = = = Y Y Y Y Y Y,
-F
 F
 F
 F
 F
/ F
 F
 F
RF
 F
 F
 F
 F
' F
 F
 F
R
 
 
 
 
 
 
 

 
 
 
 
 
 
 

 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
r%   