
    _iB                    l   S SK J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  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  SSKJrJ r   SSK!J"r"J#r#  SSK$J%r%  SSK&J'r'  SSK(J)r)  SS/r* " S S\5      r+ " S S\5      r, " S S5      r- " S S5      r. " S S5      r/ " S S5      r0g)    )annotations)LiteralN   )_legacy_response)BodyOmitQueryHeadersNotGivenSequenceNotStromit	not_given)maybe_transformasync_maybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)SyncPage	AsyncPage)AsyncPaginatormake_request_options)permission_create_paramspermission_retrieve_params)PermissionCreateResponse)PermissionDeleteResponse)PermissionRetrieveResponsePermissionsAsyncPermissionsc            	          \ rS rSr\SS j5       r\SS j5       rSSS\S.             SS jjr\	\	\	\	SSS\S.                   SS jjr
SSS\S.             SS	 jjrS
rg)r      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    p/var/www/html/land-ocr/venv/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5r+   Nextra_headersextra_query
extra_bodytimeoutc                   U(       d  [        SU< 35      eU R                  SU S3[        [           [	        SU0[
        R                  5      [        X4XVS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 /fine_tuning/checkpoints//permissionsproject_idsr1   post)pagebodyoptionsmodelmethod)
ValueError_get_api_listr   r   r   r   PermissionCreateParamsr   r'   fine_tuned_model_checkpointr;   r2   r3   r4   r5   s          r(   createPermissions.create-   s}    : +\]x\{|  !!'(C'DLQ23 -!=?W?n?no(+Q[ + " 	
 		
r+   afterlimitorder
project_idr2   r3   r4   r5   c                   U(       d  [        SU< 35      eU R                  SU S3[        UUUU	[        UUUUS.[        R
                  5      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
r8   r9   r:   rJ   rK   rL   rM   r2   r3   r4   r5   queryr?   cast_to)rB   _getr   r   r   PermissionRetrieveParamsr   
r'   rF   rJ   rK   rL   rM   r2   r3   r4   r5   s
             r(   retrievePermissions.retrieveY   s    L +\]x\{|  yy'(C'DLQ(+'%%!&!&!&&0	 /GG /#  
 	
r+   c          
         U(       d  [        SU< 35      eU(       d  [        SU< 35      eU R                  SU SU 3[        X4XVS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
r8   <Expected a non-empty value for `permission_id` but received r9   /permissions/r1   rS   rB   _deleter   r   r'   permission_idrF   r2   r3   r4   r5   s          r(   deletePermissions.delete   sw    6 +\]x\{|  [\i[lmnn||'(C'DMR_Q`a(+Q[ -  
 	
r+    )returnr%   )re   r.   )rF   strr;   SequenceNotStr[str]r2   Headers | Noner3   Query | Noner4   Body | Noner5   'float | httpx.Timeout | None | NotGivenre   z"SyncPage[PermissionCreateResponse]rF   rf   rJ   
str | OmitrK   z
int | OmitrL   z)Literal['ascending', 'descending'] | OmitrM   rm   r2   rh   r3   ri   r4   rj   r5   rk   re   r   ra   rf   rF   rf   r2   rh   r3   ri   r4   rj   r5   rk   re   r   __name__
__module____qualname____firstlineno__r   r)   r/   r   rG   r   rX   rb   __static_attributes__rd   r+   r(   r   r      s`   0 0 6 6 )-$("&;D*
%(*
 )	*
 &*
 "*
  *
 9*
 
,*
` ! ;?!% )-$("&;D<
%(<
 	<

 <
 9<
 <
 &<
 "<
  <
 9<
 
$<
J )-$("&;D'
'
 &)	'
 &'
 "'
  '
 9'
 
"'
 '
r+   c            	          \ rS rSr\SS j5       r\SS j5       rSSS\S.             SS jjr\	\	\	\	SSS\S.                   SS jjr
SSS\S.             SS	 jjrS
rg)r       c                    [        U 5      $ r$   )AsyncPermissionsWithRawResponser&   s    r(   r)   "AsyncPermissions.with_raw_response   s     /t44r+   c                    [        U 5      $ r-   )%AsyncPermissionsWithStreamingResponser&   s    r(   r/   (AsyncPermissions.with_streaming_response   s     5T::r+   Nr1   c                   U(       d  [        SU< 35      eU R                  SU S3[        [           [	        SU0[
        R                  5      [        X4XVS9[        SS9$ r7   )rB   rC   r   r   r   r   rD   r   rE   s          r(   rG   AsyncPermissions.create   s}    : +\]x\{|  !!'(C'DLQ34 -!=?W?n?no(+Q[ + " 	
 		
r+   rI   c                  #    U(       d  [        SU< 35      eU R                  SU S3[        UUUU	[        UUUUS.[        R
                  5      I Sh  vN S9[        S9I Sh  vN $  N N7f)rO   r8   r9   r:   rP   NrQ   rS   )rB   rU   r   r   r   rV   r   rW   s
             r(   rX   AsyncPermissions.retrieve  s     L +\]x\{|  YY'(C'DLQ(+'%1!&!&!&&0	 /GG  /#  
 
 	

s$   AA.A*A.%A,&A.,A.c          
        #    U(       d  [        SU< 35      eU(       d  [        SU< 35      eU R                  SU SU 3[        X4XVS9[        S9I Sh  vN $  N7f)r[   r8   r\   r9   r]   r1   rS   Nr^   r`   s          r(   rb   AsyncPermissions.delete?  s     6 +\]x\{|  [\i[lmnn\\'(C'DMR_Q`a(+Q[ - " 
 
 	
 
s   AAAArd   )re   rx   )re   r{   )rF   rf   r;   rg   r2   rh   r3   ri   r4   rj   r5   rk   re   zMAsyncPaginator[PermissionCreateResponse, AsyncPage[PermissionCreateResponse]]rl   rn   ro   rd   r+   r(   r    r       sa   5 5 ; ; )-$("&;D*
%(*
 )	*
 &*
 "*
  *
 9*
 
W*
` ! ;?!% )-$("&;D<
%(<
 	<

 <
 9<
 <
 &<
 "<
  <
 9<
 
$<
J )-$("&;D'
'
 &)	'
 &'
 "'
  '
 9'
 
"'
 '
r+   c                      \ rS rSrSS jrSrg)r%   ii  c                    X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_wrapperrG   rX   rb   r'   permissionss     r(   __init__#PermissionsWithRawResponse.__init__j  s]    '&>>
 )@@  
 '>>
r+   r   rG   rb   rX   Nr   r   re   Nonerp   rq   rr   rs   r   rt   rd   r+   r(   r%   r%   i      
r+   r%   c                      \ rS rSrSS jrSrg)rx   ix  c                    X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_wrapperrG   rX   rb   r   s     r(   r   (AsyncPermissionsWithRawResponse.__init__y  s]    '&DD
 )FF  
 'DD
r+   r   Nr   r    re   r   r   rd   r+   r(   rx   rx   x  r   r+   rx   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        g r   )r   r   rG   rX   rb   r   s     r(   r   )PermissionsWithStreamingResponse.__init__  sK    '2
 5  
 3
r+   r   Nr   r   rd   r+   r(   r.   r.     r   r+   r.   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        g r   )r   r   rG   rX   rb   r   s     r(   r   .AsyncPermissionsWithStreamingResponse.__init__  sK    '8
 ;  
 9
r+   r   Nr   r   rd   r+   r(   r{   r{     r   r+   r{   )1
__future__r   typing_extensionsr   httpx r   _typesr   r   r	   r
   r   r   r   r   _utilsr   r   _compatr   	_resourcer   r   	_responser   r   
paginationr   r   _base_clientr   r   types.fine_tuning.checkpointsr   r   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%   rx   r.   r{   rd   r+   r(   <module>r      s    # %  ! \ \ \ = ' ; Z . A b a a e,
-e
/ e
Pe
' e
P
 

 

 

 
r+   