
    2Rj                    @   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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e      Z# G d de      Z$ G d d      Z% G d d      Z& G d d      Z' G d d      Z(y)    )annotationsN   )_legacy_response)BodyOmitQueryHeadersNotGivenomit	not_given)path_template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                  j    e Zd ZdZedd       Zedd       Zeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d	dZ	y)
r   IManage fine-tuning jobs to tailor a model to your specific training data.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
        )CheckpointsWithRawResponseselfs    u/var/www/html/meridian/meridian-ai/venv/lib/python3.12/site-packages/openai/resources/fine_tuning/jobs/checkpoints.pywith_raw_responsezCheckpoints.with_raw_response   s     *$//    c                    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
        ) CheckpointsWithStreamingResponser!   s    r#   with_streaming_responsez#Checkpoints.with_streaming_response%   s     055r%   Nafterlimitextra_headersextra_query
extra_bodytimeoutc                   |st        d|      | j                  t        d|      t        t           t        ||||t        ||dt        j                        ddi      t              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 z2/fine_tuning/jobs/{fine_tuning_job_id}/checkpoints)fine_tuning_job_id)r+   r,   bearer_authT)r-   r.   r/   r0   querysecurity)pageoptionsmodel)	
ValueError_get_api_listr   r   r   r   r   r   CheckpointListParamsr"   r3   r+   r,   r-   r.   r/   r0   s           r#   listzCheckpoints.list.   s    : "`as`vwxx!!Ncuv 78(+'%%!&!& +?? (. *# " 
 	
r%   )returnr    )r?   r(   )r3   strr+   
str | Omitr,   
int | Omitr-   Headers | Noner.   Query | Noner/   Body | Noner0   'float | httpx.Timeout | None | NotGivenr?   z'SyncCursorPage[FineTuningJobCheckpoint]
__name__
__module____qualname____doc__r   r$   r)   r   r   r>    r%   r#   r   r      s    S0 0 6 6 !  )-$("&;D1
1
 	1

 1
 &1
 "1
  1
 91
 
11
r%   c                  j    e Zd ZdZedd       Zedd       Zeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d	dZ	y)
r   r   c                    t        |       S r   )AsyncCheckpointsWithRawResponser!   s    r#   r$   z"AsyncCheckpoints.with_raw_responsee   s     /t44r%   c                    t        |       S r'   )%AsyncCheckpointsWithStreamingResponser!   s    r#   r)   z(AsyncCheckpoints.with_streaming_responseo   s     5T::r%   Nr*   c                   |st        d|      | j                  t        d|      t        t           t        ||||t        ||dt        j                        ddi      t              S r2   )	r:   r;   r   r   r   r   r   r   r<   r=   s           r#   r>   zAsyncCheckpoints.listx   s    : "`as`vwxx!!Ncuv !89(+'%%!&!& +?? (. *# " 
 	
r%   )r?   rO   )r?   rQ   )r3   r@   r+   rA   r,   rB   r-   rC   r.   rD   r/   rE   r0   rF   r?   zQAsyncPaginator[FineTuningJobCheckpoint, AsyncCursorPage[FineTuningJobCheckpoint]]rG   rL   r%   r#   r   r   b   s    S5 5 ; ; !  )-$("&;D1
1
 	1

 1
 &1
 "1
  1
 91
 
[1
r%   c                      e Zd ZddZy)r    c                Z    || _         t        j                  |j                        | _        y N)_checkpointsr   to_raw_response_wrapperr>   r"   checkpointss     r#   __init__z#CheckpointsWithRawResponse.__init__   s%    '$<<
	r%   NrY   r   r?   NonerH   rI   rJ   rZ   rL   r%   r#   r    r           
r%   r    c                      e Zd ZddZy)rO   c                Z    || _         t        j                  |j                        | _        y rU   )rV   r   async_to_raw_response_wrapperr>   rX   s     r#   rZ   z(AsyncCheckpointsWithRawResponse.__init__   s%    '$BB
	r%   NrY   r   r?   r\   r]   rL   r%   r#   rO   rO      r^   r%   rO   c                      e Zd ZddZy)r(   c                F    || _         t        |j                        | _        y rU   )rV   r   r>   rX   s     r#   rZ   z)CheckpointsWithStreamingResponse.__init__   s    '0
	r%   Nr[   r]   rL   r%   r#   r(   r(      r^   r%   r(   c                      e Zd ZddZy)rQ   c                F    || _         t        |j                        | _        y rU   )rV   r   r>   rX   s     r#   rZ   z.AsyncCheckpointsWithStreamingResponse.__init__   s    '6
	r%   Nrb   r]   rL   r%   r#   rQ   rQ      r^   r%   rQ   ))
__future__r   httpx r   _typesr   r   r   r	   r
   r   r   _utilsr   r   _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    rO   r(   rQ   rL   r%   r#   <module>rt      s    #  ! L L L 5 ' ; Z : > Y,
-G
/ G
TG
' G
T
 

 

 

 
r%   