o
    ùT·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#   úp/home/dinkstrade/pdmp-scanner/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-   Ú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   rG   r#   r#   r#   r$   r      ó    	õc                   @  r   )r   r   r   ÚAsyncCheckpointsWithRawResponsec                 C  r   r    )rO   r!   r#   r#   r$   r%   b   r&   z"AsyncCheckpoints.with_raw_responseÚ%AsyncCheckpointsWithStreamingResponsec                 C  r   r(   )rP   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<   )	rC   rD   r   r   r   r   r   r   rE   rF   r#   r#   r$   rG   u   rH   zAsyncCheckpoints.list)r   rO   )r   rP   )r2   r3   r,   r4   r-   r5   r.   r6   r/   r7   r0   r8   r1   r9   r   rQ   rI   r#   r#   r#   r$   r   _   rN   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_wrapperrG   ©r"   rS   r#   r#   r$   Ú__init__ª   ó   
ÿz#CheckpointsWithRawResponse.__init__N©rS   r   r   rT   ©rJ   rK   rL   rZ   r#   r#   r#   r$   r   ©   ó    r   c                   @  rR   )	rO   rS   r   r   rT   c                 C  rU   rV   )rW   r   Úasync_to_raw_response_wrapperrG   rY   r#   r#   r$   rZ   ³   r[   z(AsyncCheckpointsWithRawResponse.__init__N©rS   r   r   rT   r]   r#   r#   r#   r$   rO   ²   r^   rO   c                   @  rR   )	r'   rS   r   r   rT   c                 C  ó   || _ t|jƒ| _d S rV   )rW   r   rG   rY   r#   r#   r$   rZ   ¼   ó   
ÿz)CheckpointsWithStreamingResponse.__init__Nr\   r]   r#   r#   r#   r$   r'   »   r^   r'   c                   @  rR   )	rP   rS   r   r   rT   c                 C  ra   rV   )rW   r   rG   rY   r#   r#   r$   rZ   Å   rb   z.AsyncCheckpointsWithStreamingResponse.__init__Nr`   r]   r#   r#   r#   r$   rP   Ä   r^   rP   ))Ú
__future__r   Úhttpx2Ú 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'   rP   r#   r#   r#   r$   Ú<module>   s&   $JJ			