o
    {$f8                     @  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 N)r   self r   c/var/www/html/dev/env/lib/python3.10/site-packages/openai/resources/fine_tuning/jobs/checkpoints.pywith_raw_response      zCheckpoints.with_raw_response CheckpointsWithStreamingResponsec                 C  r   r   )r#   r   r   r   r    with_streaming_response   r"   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&   r.   r'   r/   r(   r0   r)   r1   r*   r2   r+   r3   r   r4   __name__
__module____qualname__r   r!   r$   r   r?   r   r   r   r    r          c                   @  r   )r   r   AsyncCheckpointsWithRawResponsec                 C  r   r   )rF   r   r   r   r    r!   U   r"   z"AsyncCheckpoints.with_raw_response%AsyncCheckpointsWithStreamingResponsec                 C  r   r   )rG   r   r   r   r    r$   Y   r"   z(AsyncCheckpoints.with_streaming_responseNr%   r,   r-   r&   r.   r'   r/   r(   r0   r)   r1   r*   r2   r+   r3   QAsyncPaginator[FineTuningJobCheckpoint, AsyncCursorPage[FineTuningJobCheckpoint]]c                C  r5   r6   )r;   r<   r   r   r   r
   r   r=   r>   r   r   r    r?   ]   r@   zAsyncCheckpoints.list)r   rF   )r   rG   )r,   r-   r&   r.   r'   r/   r(   r0   r)   r1   r*   r2   r+   r3   r   rH   rA   r   r   r   r    r   T   rE   c                   @     e Zd ZdddZdS )	r   checkpointsr   r   Nonec                 C     || _ t|j| _d S r   )_checkpointsr   to_raw_response_wrapperr?   r   rJ   r   r   r    __init__      
z#CheckpointsWithRawResponse.__init__NrJ   r   r   rK   rB   rC   rD   rP   r   r   r   r    r          r   c                   @  rI   )	rF   rJ   r   r   rK   c                 C  rL   r   )rM   r   async_to_raw_response_wrapperr?   rO   r   r   r    rP      rQ   z(AsyncCheckpointsWithRawResponse.__init__NrJ   r   r   rK   rS   r   r   r   r    rF      rT   rF   c                   @  rI   )	r#   rJ   r   r   rK   c                 C     || _ t|j| _d S r   )rM   r   r?   rO   r   r   r    rP         
z)CheckpointsWithStreamingResponse.__init__NrR   rS   r   r   r   r    r#      rT   r#   c                   @  rI   )	rG   rJ   r   r   rK   c                 C  rW   r   )rM   r   r?   rO   r   r   r    rP      rX   z.AsyncCheckpointsWithStreamingResponse.__init__NrV   rS   r   r   r   r    rG      rT   rG   )&
__future__r   httpx r   _typesr   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   rF   r#   rG   r   r   r   r    <module>   s&   <<			