a
    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                
   @  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 N)r   self r   f/var/www/ai-form-bot/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 r   )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   r2   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   )rA   r   r   r   r   r    U   s    z"AsyncCheckpoints.with_raw_response%AsyncCheckpointsWithStreamingResponsec                 C  s   t | S r   )rB   r   r   r   r   r"   Y   s    z(AsyncCheckpoints.with_streaming_responseNr#   r*   r+   r,   r-   r.   r/   r0   zQAsyncPaginator[FineTuningJobCheckpoint, AsyncCursorPage[FineTuningJobCheckpoint]]r1   c                C  sL   |st d|| jd| dtt t||||t||dtjdtdS r3   )r8   r9   r   r   r   r
   r   r:   r;   r   r   r   r<   ]   s&    
zAsyncCheckpoints.listr=   r   r   r   r   r   T   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 r   )_checkpointsr   Zto_raw_response_wrapperr<   r   rE   r   r   r   __init__   s    z#CheckpointsWithRawResponse.__init__Nr>   r?   r@   rH   r   r   r   r   r      s   r   c                   @  s   e Zd ZdddddZdS )rA   r   rC   rD   c                 C  s   || _ t|j| _d S r   )rF   r   Zasync_to_raw_response_wrapperr<   rG   r   r   r   rH      s    z(AsyncCheckpointsWithRawResponse.__init__NrI   r   r   r   r   rA      s   rA   c                   @  s   e Zd ZdddddZdS )r!   r   rC   rD   c                 C  s   || _ t|j| _d S r   )rF   r   r<   rG   r   r   r   rH      s    z)CheckpointsWithStreamingResponse.__init__NrI   r   r   r   r   r!      s   r!   c                   @  s   e Zd ZdddddZdS )rB   r   rC   rD   c                 C  s   || _ t|j| _d S r   )rF   r   r<   rG   r   r   r   rH      s    z.AsyncCheckpointsWithStreamingResponse.__init__NrI   r   r   r   r   rB      s   rB   )&
__future__r   Zhttpx r   _typesr   r   r   r   r	   Z_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   rA   r!   rB   r   r   r   r   <module>   s$   <<			