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 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)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                   @  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!   m/var/www/html/flask_server/venv/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 | Omitr+   
int | Omitr,   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    r0   r*   r+   r,   r-   r.   r/   r!   r!   r"   list,   &   
zCheckpoints.list)r   r   )r   r%   )r0   r1   r*   r2   r+   r3   r,   r4   r-   r5   r.   r6   r/   r7   r   r8   	__name__
__module____qualname__r   r#   r'   r
   r   rC   r!   r!   r!   r"   r          	c                   @  r   )r   r   AsyncCheckpointsWithRawResponsec                 C  r   r   )rJ   r   r!   r!   r"   r#   `   r$   z"AsyncCheckpoints.with_raw_response%AsyncCheckpointsWithStreamingResponsec                 C  r   r&   )rK   r   r!   r!   r"   r'   j   r(   z(AsyncCheckpoints.with_streaming_responseNr)   r0   r1   r*   r2   r+   r3   r,   r4   r-   r5   r.   r6   r/   r7   QAsyncPaginator[FineTuningJobCheckpoint, AsyncCursorPage[FineTuningJobCheckpoint]]c                C  r9   r:   )r?   r@   r   r   r   r   r   rA   rB   r!   r!   r"   rC   s   rD   zAsyncCheckpoints.list)r   rJ   )r   rK   )r0   r1   r*   r2   r+   r3   r,   r4   r-   r5   r.   r6   r/   r7   r   rL   rE   r!   r!   r!   r"   r   _   rI   c                   @     e Zd ZdddZdS )	r   checkpointsr   r   Nonec                 C     || _ t|j| _d S N)_checkpointsr   to_raw_response_wrapperrC   r    rN   r!   r!   r"   __init__      
z#CheckpointsWithRawResponse.__init__NrN   r   r   rO   rF   rG   rH   rU   r!   r!   r!   r"   r          r   c                   @  rM   )	rJ   rN   r   r   rO   c                 C  rP   rQ   )rR   r   async_to_raw_response_wrapperrC   rT   r!   r!   r"   rU      rV   z(AsyncCheckpointsWithRawResponse.__init__NrN   r   r   rO   rX   r!   r!   r!   r"   rJ      rY   rJ   c                   @  rM   )	r%   rN   r   r   rO   c                 C     || _ t|j| _d S rQ   )rR   r   rC   rT   r!   r!   r"   rU         
z)CheckpointsWithStreamingResponse.__init__NrW   rX   r!   r!   r!   r"   r%      rY   r%   c                   @  rM   )	rK   rN   r   r   rO   c                 C  r\   rQ   )rR   r   rC   rT   r!   r!   r"   rU      r]   z.AsyncCheckpointsWithStreamingResponse.__init__Nr[   rX   r!   r!   r!   r"   rK      rY   rK   )(
__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   rJ   r%   rK   r!   r!   r!   r"   <module>   s&   $GG			