o
    r)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                   @  F   e Zd 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   IManage fine-tuning jobs to tailor a model to your specific training data.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"   q/var/www/html/voicebot/backend/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 | Noner0   '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/   r0   query)pageoptionsmodel)
ValueError_get_api_listr   r   r   r   r   CheckpointListParamsr!   r1   r+   r,   r-   r.   r/   r0   r"   r"   r#   list.   &   
zCheckpoints.list)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#   r          	c                   @  r   )r   r   r   AsyncCheckpointsWithRawResponsec                 C  r   r   )rL   r    r"   r"   r#   r$   d   r%   z"AsyncCheckpoints.with_raw_response%AsyncCheckpointsWithStreamingResponsec                 C  r   r'   )rM   r    r"   r"   r#   r(   n   r)   z(AsyncCheckpoints.with_streaming_responseNr*   r1   r2   r+   r3   r,   r4   r-   r5   r.   r6   r/   r7   r0   r8   QAsyncPaginator[FineTuningJobCheckpoint, AsyncCursorPage[FineTuningJobCheckpoint]]c                C  r:   r;   )r@   rA   r   r   r   r   r   rB   rC   r"   r"   r#   rD   w   rE   zAsyncCheckpoints.list)r   rL   )r   rM   )r1   r2   r+   r3   r,   r4   r-   r5   r.   r6   r/   r7   r0   r8   r   rN   rF   r"   r"   r"   r#   r   a   rK   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_wrapperrD   r!   rP   r"   r"   r#   __init__      
z#CheckpointsWithRawResponse.__init__NrP   r   r   rQ   rG   rH   rI   rW   r"   r"   r"   r#   r          r   c                   @  rO   )	rL   rP   r   r   rQ   c                 C  rR   rS   )rT   r   async_to_raw_response_wrapperrD   rV   r"   r"   r#   rW      rX   z(AsyncCheckpointsWithRawResponse.__init__NrP   r   r   rQ   rZ   r"   r"   r"   r#   rL      r[   rL   c                   @  rO   )	r&   rP   r   r   rQ   c                 C     || _ t|j| _d S rS   )rT   r   rD   rV   r"   r"   r#   rW         
z)CheckpointsWithStreamingResponse.__init__NrY   rZ   r"   r"   r"   r#   r&      r[   r&   c                   @  rO   )	rM   rP   r   r   rQ   c                 C  r^   rS   )rT   r   rD   rV   r"   r"   r#   rW      r_   z.AsyncCheckpointsWithStreamingResponse.__init__Nr]   rZ   r"   r"   r"   r#   rM      r[   rM   )(
__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&   rM   r"   r"   r"   r#   <module>   s&   $II			