
    _jb                       S SK Jr  S SKrS SKJr  S SKrSSKJr  SSKJrJ	r	J
r
JrJrJrJrJr  SSKJrJrJr  SSKJr  SS	KJrJr  SS
KJrJr  SSKJrJrJrJ r   SSK!J"r"J#r#  SSK$J%r%J&r&J'r'  SSK(J)r)  SSK*J+r+  SSK,J-r-  SSK.J/r/  SS/r0 " S S\5      r1 " S S\5      r2 " S S5      r3 " S S5      r4 " S S5      r5 " S S5      r6g)    )annotationsN)Literal   )_legacy_response)BodyOmitQueryHeadersNotGivenSequenceNotStromit	not_given)path_templatemaybe_transformasync_maybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)SyncPage	AsyncPageSyncConversationCursorPageAsyncConversationCursorPage)AsyncPaginatormake_request_options)permission_list_paramspermission_create_paramspermission_retrieve_params)PermissionListResponse)PermissionCreateResponse)PermissionDeleteResponse)PermissionRetrieveResponsePermissionsAsyncPermissionsc            
      Z   \ rS rSrSr\SS j5       r\SS j5       rSSS\S.             SS jjr	\
R                  " S5      \\\\SSS\S	.                   SS
 jj5       r\\\\SSS\S	.                   SS jjrSSS\S.             SS jjrSrg)r$      IManage fine-tuning jobs to tailor a model to your specific training data.c                    [        U 5      $ z
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
)PermissionsWithRawResponseselfs    i/home/rurouni/.local/lib/python3.13/site-packages/openai/resources/fine_tuning/checkpoints/permissions.pywith_raw_responsePermissions.with_raw_response"   s     *$//    c                    [        U 5      $ 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
) PermissionsWithStreamingResponser,   s    r.   with_streaming_response#Permissions.with_streaming_response,   s     055r1   Nextra_headersextra_query
extra_bodytimeoutc                   U(       d  [        SU< 35      eU R                  [        SUS9[        [           [        SU0[        R                  5      [        UUUUSS0S9[        SS	9$ 
a  
**NOTE:** Calling this endpoint requires an [admin API key](../admin-api-keys).

This enables organization owners to share fine-tuned models with other projects
in their organization.

Args:
  project_ids: The project identifiers to grant access to.

  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
JExpected a non-empty value for `fine_tuned_model_checkpoint` but received B/fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissionsfine_tuned_model_checkpointproject_idsbearer_authTr8   r9   r:   r;   securitypost)pagebodyoptionsmodelmethod)	
ValueError_get_api_listr   r   r!   r   r   PermissionCreateParamsr   r-   rA   rB   r8   r9   r:   r;   s          r.   createPermissions.create5   s    : +\]x\{|  !!T,G 23 -!=?W?n?no(+'%'. + " 
 	
r1   IRetrieve is deprecated. Please swap to the paginated list method instead.afterlimitorder
project_idr8   r9   r:   r;   c                   U(       d  [        SU< 35      eU R                  [        SUS9[        UUUU	[	        UUUUS.[
        R                  5      SS0S9[        S9$ )	  
**NOTE:** This endpoint requires an [admin API key](../admin-api-keys).

Organization owners can use this endpoint to view all permissions for a
fine-tuned model checkpoint.

Args:
  after: Identifier for the last permission ID from the previous pagination request.

  limit: Number of permissions to retrieve.

  order: The order in which to retrieve permissions.

  project_id: The ID of the project to get permissions for.

  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
r>   r?   r@   rT   rU   rV   rW   rC   Tr8   r9   r:   r;   queryrE   rI   cast_to)rL   _getr   r   r   r   PermissionRetrieveParamsr#   
r-   rA   rT   rU   rV   rW   r8   r9   r:   r;   s
             r.   retrievePermissions.retrieveh   s    N +\]x\{|  yyT,G )+'%%!&!&!&&0	 /GG (.  /+  
 	
r1   c                   U(       d  [        SU< 35      eU R                  [        SUS9[        [           [        UUUU	[        UUUUS.[        R                  5      SS0S9[        S9$ 	rY   r>   r?   r@   rZ   rC   Tr[   )rG   rI   rJ   )	rL   rM   r   r   r    r   r   r   PermissionListParamsra   s
             r.   listPermissions.list   s    L +\]x\{|  !!T,G ,,BC(+'%%!&!&!&&0	 +?? (.  )- " 
 	
r1   c                   U(       d  [        SU< 35      eU(       d  [        SU< 35      eU R                  [        SUUS9[        UUUUSS0S9[        S9$ )	  
**NOTE:** This endpoint requires an [admin API key](../admin-api-keys).

Organization owners can use this endpoint to delete a permission for a
fine-tuned model checkpoint.

Args:
  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
r>   <Expected a non-empty value for `permission_id` but received R/fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions/{permission_id}rA   permission_idrC   TrD   r]   rL   _deleter   r   r"   r-   rn   rA   r8   r9   r:   r;   s          r.   deletePermissions.delete   s    6 +\]x\{|  [\i[lmnn||d,G+
 )+'%'. -  
 	
r1    )returnr+   )ru   r4   )rA   strrB   SequenceNotStr[str]r8   Headers | Noner9   Query | Noner:   Body | Noner;   'float | httpx.Timeout | None | NotGivenru   z"SyncPage[PermissionCreateResponse]rA   rv   rT   
str | OmitrU   
int | OmitrV   )Literal['ascending', 'descending'] | OmitrW   r}   r8   rx   r9   ry   r:   rz   r;   r{   ru   r#   )rA   rv   rT   r}   rU   r~   rV   r   rW   r}   r8   rx   r9   ry   r:   rz   r;   r{   ru   z2SyncConversationCursorPage[PermissionListResponse]rn   rv   rA   rv   r8   rx   r9   ry   r:   rz   r;   r{   ru   r"   __name__
__module____qualname____firstlineno____doc__r   r/   r5   r   rP   typing_extensions
deprecatedr   rb   rg   rr   __static_attributes__rt   r1   r.   r$   r$      s   S0 0 6 6 )-$("&;D1
%(1
 )	1
 &1
 "1
  1
 91
 
,1
f !!"mn
 ! ;?!% )-$("&;D@
%(@
 	@

 @
 9@
 @
 &@
 "@
  @
 9@
 
$@
 o@
L ! ;?!% )-$("&;DA
%(A
 	A

 A
 9A
 A
 &A
 "A
  A
 9A
 
<A
T )-$("&;D/
/
 &)	/
 &/
 "/
  /
 9/
 
"/
 /
r1   c            
      Z   \ rS rSrSr\SS j5       r\SS j5       rSSS\S.             SS jjr	\
R                  " S5      \\\\SSS\S	.                   SS
 jj5       r\\\\SSS\S	.                   SS jjrSSS\S.             SS jjrSrg)r%   i   r(   c                    [        U 5      $ r*   )AsyncPermissionsWithRawResponser,   s    r.   r/   "AsyncPermissions.with_raw_response#  s     /t44r1   c                    [        U 5      $ r3   )%AsyncPermissionsWithStreamingResponser,   s    r.   r5   (AsyncPermissions.with_streaming_response-  s     5T::r1   Nr7   c                   U(       d  [        SU< 35      eU R                  [        SUS9[        [           [        SU0[        R                  5      [        UUUUSS0S9[        SS	9$ r=   )	rL   rM   r   r   r!   r   r   rN   r   rO   s          r.   rP   AsyncPermissions.create6  s    : +\]x\{|  !!T,G 34 -!=?W?n?no(+'%'. + " 
 	
r1   rR   rS   c                  #    U(       d  [        SU< 35      eU R                  [        SUS9[        UUUU	[	        UUUUS.[
        R                  5      I Sh  vN SS0S9[        S	9I Sh  vN $  N N7f)
rY   r>   r?   r@   rZ   NrC   Tr[   r]   )rL   r_   r   r   r   r   r`   r#   ra   s
             r.   rb   AsyncPermissions.retrievei  s     N +\]x\{|  YYT,G )+'%1!&!&!&&0	 /GG  (.  /+  
 
 	

s$   AA5A1A5,A3-A53A5c                   U(       d  [        SU< 35      eU R                  [        SUS9[        [           [        UUUU	[        UUUUS.[        R                  5      SS0S9[        S9$ re   )	rL   rM   r   r   r    r   r   r   rf   ra   s
             r.   rg   AsyncPermissions.list  s    L +\]x\{|  !!T,G --CD(+'%%!&!&!&&0	 +?? (.  )- " 
 	
r1   c                  #    U(       d  [        SU< 35      eU(       d  [        SU< 35      eU R                  [        SUUS9[        UUUUSS0S9[        S9I S	h  vN $  N7f)
rj   r>   rk   rl   rm   rC   TrD   r]   Nro   rq   s          r.   rr   AsyncPermissions.delete  s     6 +\]x\{|  [\i[lmnn\\d,G+
 )+'%'. - " 
 
 	
 
s   AA$A"A$rt   )ru   r   )ru   r   )rA   rv   rB   rw   r8   rx   r9   ry   r:   rz   r;   r{   ru   zMAsyncPaginator[PermissionCreateResponse, AsyncPage[PermissionCreateResponse]]r|   )rA   rv   rT   r}   rU   r~   rV   r   rW   r}   r8   rx   r9   ry   r:   rz   r;   r{   ru   z[AsyncPaginator[PermissionListResponse, AsyncConversationCursorPage[PermissionListResponse]]r   r   rt   r1   r.   r%   r%      s   S5 5 ; ; )-$("&;D1
%(1
 )	1
 &1
 "1
  1
 91
 
W1
f !!"mn
 ! ;?!% )-$("&;D@
%(@
 	@

 @
 9@
 @
 &@
 "@
  @
 9@
 
$@
 o@
L ! ;?!% )-$("&;DA
%(A
 	A

 A
 9A
 A
 &A
 "A
  A
 9A
 
eA
T )-$("&;D/
/
 &)	/
 &/
 "/
  /
 9/
 
"/
 /
r1   c                      \ rS rSrSS jrSrg)r+   i!  c                8   Xl         [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR
                  5      U l        [        R                  " UR                  5      U l        g N)_permissionsr   to_raw_response_wrapperrP   rb   rg   rr   r-   permissionss     r.   __init__#PermissionsWithRawResponse.__init__"  s}    '&>>
 44$$ 	
 %<<
	 '>>
r1   r   rP   rr   rg   rb   Nr   r$   ru   Noner   r   r   r   r   r   rt   r1   r.   r+   r+   !      
r1   r+   c                      \ rS rSrSS jrSrg)r   i5  c                8   Xl         [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR
                  5      U l        [        R                  " UR                  5      U l        g r   )r   r   async_to_raw_response_wrapperrP   rb   rg   rr   r   s     r.   r   (AsyncPermissionsWithRawResponse.__init__6  s}    '&DD
 ::$$ 	
 %BB
	 'DD
r1   r   Nr   r%   ru   r   r   rt   r1   r.   r   r   5  r   r1   r   c                      \ rS rSrSS jrSrg)r4   iI  c                    Xl         [        UR                  5      U l        [        UR                  5      U l        [        UR                  5      U l        [        UR
                  5      U l        g r   )r   r   rP   rb   rg   rr   r   s     r.   r   )PermissionsWithStreamingResponse.__init__J  se    '2
 )$$ 	
 1
	 3
r1   r   Nr   r   rt   r1   r.   r4   r4   I  r   r1   r4   c                      \ rS rSrSS jrSrg)r   i]  c                    Xl         [        UR                  5      U l        [        UR                  5      U l        [        UR                  5      U l        [        UR
                  5      U l        g r   )r   r   rP   rb   rg   rr   r   s     r.   r   .AsyncPermissionsWithStreamingResponse.__init__^  se    '8
 /$$ 	
 7
	 9
r1   r   Nr   r   rt   r1   r.   r   r   ]  r   r1   r   )7
__future__r   r   r   httpx r   _typesr   r   r	   r
   r   r   r   r   _utilsr   r   r   _compatr   	_resourcer   r   	_responser   r   
paginationr   r   r   r   _base_clientr   r   types.fine_tuning.checkpointsr   r   r   6types.fine_tuning.checkpoints.permission_list_responser    8types.fine_tuning.checkpoints.permission_create_responser!   8types.fine_tuning.checkpoints.permission_delete_responser"   :types.fine_tuning.checkpoints.permission_retrieve_responser#   __all__r$   r%   r+   r   r4   r   rt   r1   r.   <module>r      s    #  %  ! \ \ \ L L ' ; Z g g A 
 ^ a a e,
-~
/ ~
B~
' ~
B
 
(
 
(
 
(
 
r1   