a
    _g*                     @  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                
   @  s\   e Zd ZeddddZeddddZeeddded	d
ddddddddddZdS )r   CheckpointsWithRawResponsereturnc                 C  s   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   {/var/www/html/cobodadashboardai.evdpl.com/venv/lib/python3.9/site-packages/openai/resources/fine_tuning/jobs/checkpoints.pywith_raw_response   s    zCheckpoints.with_raw_response CheckpointsWithStreamingResponsec                 C  s   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   r   r   r   with_streaming_response#   s    z#Checkpoints.with_streaming_responseNafterlimitextra_headersextra_query
extra_bodytimeoutstrstr | NotGivenint | NotGivenHeaders | NoneQuery | NoneBody | None'float | httpx.Timeout | None | NotGivenz'SyncCursorPage[FineTuningJobCheckpoint]fine_tuning_job_idr%   r&   r'   r(   r)   r*   r   c                C  sL   |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   r3   r%   r&   r'   r(   r)   r*   r   r   r   list,   s&    
zCheckpoints.list__name__
__module____qualname__r   r    r#   r   r=   r   r   r   r   r      s   	c                
   @  s\   e Zd ZeddddZeddddZeeddded	d
ddddddddddZdS )r   AsyncCheckpointsWithRawResponser   c                 C  s   t | S r   )rB   r   r   r   r   r    `   s    z"AsyncCheckpoints.with_raw_response%AsyncCheckpointsWithStreamingResponsec                 C  s   t | S r"   )rC   r   r   r   r   r#   j   s    z(AsyncCheckpoints.with_streaming_responseNr$   r+   r,   r-   r.   r/   r0   r1   zQAsyncPaginator[FineTuningJobCheckpoint, AsyncCursorPage[FineTuningJobCheckpoint]]r2   c                C  sL   |st d|| jd| dtt t||||t||dtjdtdS r4   )r9   r:   r   r   r   r
   r   r;   r<   r   r   r   r=   s   s&    
zAsyncCheckpoints.listr>   r   r   r   r   r   _   s   	c                   @  s   e Zd ZdddddZdS )r   r   Nonecheckpointsr   c                 C  s   || _ t|j| _d S N)_checkpointsr   Zto_raw_response_wrapperr=   r   rF   r   r   r   __init__   s    z#CheckpointsWithRawResponse.__init__Nr?   r@   rA   rJ   r   r   r   r   r      s   r   c                   @  s   e Zd ZdddddZdS )rB   r   rD   rE   c                 C  s   || _ t|j| _d S rG   )rH   r   Zasync_to_raw_response_wrapperr=   rI   r   r   r   rJ      s    z(AsyncCheckpointsWithRawResponse.__init__NrK   r   r   r   r   rB      s   rB   c                   @  s   e Zd ZdddddZdS )r!   r   rD   rE   c                 C  s   || _ t|j| _d S rG   )rH   r   r=   rI   r   r   r   rJ      s    z)CheckpointsWithStreamingResponse.__init__NrK   r   r   r   r   r!      s   r!   c                   @  s   e Zd ZdddddZdS )rC   r   rD   rE   c                 C  s   || _ t|j| _d S rG   )rH   r   r=   rI   r   r   r   rJ      s    z.AsyncCheckpointsWithStreamingResponse.__init__NrK   r   r   r   r   rC      s   rC   )&
__future__r   Zhttpx r   _typesr   r   r   r   r	   _utilsr
   Z_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   rB   r!   rC   r   r   r   r   <module>   s$   GG			