o
    ¨ÝjŠ  ã                   @  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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)Ú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                   @  ó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#   úh/var/www/html/chatgpt/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 | Noner0   úBody | Noner1   ú(float | httpx2.Timeout | None | NotGivenú'SyncCursorPage[FineTuningJobCheckpoint]c                C  óR   |s	t d|›�ƒ‚| jtd|d�tt t||||t||dœtjƒddi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 z2/fine_tuning/jobs/{fine_tuning_job_id}/checkpoints)r2   )r,   r-   Zbearer_authT)r.   r/   r0   r1   ÚqueryÚsecurity)ÚpageÚoptionsÚmodel)	Ú
ValueErrorÚ_get_api_listr   r   r   r   r   r   ÚCheckpointListParams©r"   r2   r,   r-   r.   r/   r0   r1   r#   r#   r$   Úlist+   ó(   
þûôïzCheckpoints.list)r   r   )r   r'   )r2   r3   r,   r4   r-   r5   r.   r6   r/   r7   r0   r8   r1   r9   r   r:   ©
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r%   r)   r
   r   rF   r#   r#   r#   r$   r      ó    	õc                   @  r   )r   r   r   ÚAsyncCheckpointsWithRawResponsec                 C  r   r    )rN   r!   r#   r#   r$   r%   b   r&   z"AsyncCheckpoints.with_raw_responseÚ%AsyncCheckpointsWithStreamingResponsec                 C  r   r(   )rO   r!   r#   r#   r$   r)   l   r*   z(AsyncCheckpoints.with_streaming_responseNr+   r2   r3   r,   r4   r-   r5   r.   r6   r/   r7   r0   r8   r1   r9   úQAsyncPaginator[FineTuningJobCheckpoint, AsyncCursorPage[FineTuningJobCheckpoint]]c                C  r;   r<   )	rB   rC   r   r   r   r   r   r   rD   rE   r#   r#   r$   rF   u   rG   zAsyncCheckpoints.list)r   rN   )r   rO   )r2   r3   r,   r4   r-   r5   r.   r6   r/   r7   r0   r8   r1   r9   r   rP   rH   r#   r#   r#   r$   r   _   rM   c                   @  ó   e Zd Zddd„ZdS )	r   Úcheckpointsr   r   ÚNonec                 C  ó   || _ t |j¡| _d S ©N)Ú_checkpointsr   Zto_raw_response_wrapperrF   ©r"   rR   r#   r#   r$   Ú__init__ª   ó   
ÿz#CheckpointsWithRawResponse.__init__N©rR   r   r   rS   ©rI   rJ   rK   rX   r#   r#   r#   r$   r   ©   ó    r   c                   @  rQ   )	rN   rR   r   r   rS   c                 C  rT   rU   )rV   r   Zasync_to_raw_response_wrapperrF   rW   r#   r#   r$   rX   ³   rY   z(AsyncCheckpointsWithRawResponse.__init__N©rR   r   r   rS   r[   r#   r#   r#   r$   rN   ²   r\   rN   c                   @  rQ   )	r'   rR   r   r   rS   c                 C  ó   || _ t|jƒ| _d S rU   )rV   r   rF   rW   r#   r#   r$   rX   ¼   ó   
ÿz)CheckpointsWithStreamingResponse.__init__NrZ   r[   r#   r#   r#   r$   r'   »   r\   r'   c                   @  rQ   )	rO   rR   r   r   rS   c                 C  r^   rU   )rV   r   rF   rW   r#   r#   r$   rX   Å   r_   z.AsyncCheckpointsWithStreamingResponse.__init__Nr]   r[   r#   r#   r#   r$   rO   Ä   r\   rO   ))Ú
__future__r   Zhttpx2Ú r   Ú_typesr   r   r   r   r	   r
   r   Z_utilsr   r   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   rN   r'   rO   r#   r#   r#   r$   Ú<module>   s&   $JJ			