
    _i'_                       S SK Jr  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  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JrJ r 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K0J1r1  SSK2J3r3  SSK4J5r5  SSK6J7r7  SS/r8 " S S\5      r9 " S S\5      r: " S S5      r; " S S5      r< " S S 5      r= " S! S"5      r>g)#    )annotations)Optional)LiteralN   )_legacy_response)BodyOmitQueryHeadersNotGivenomit	not_given)maybe_transformasync_maybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper   )OutputItemsAsyncOutputItemsOutputItemsWithRawResponseAsyncOutputItemsWithRawResponse OutputItemsWithStreamingResponse%AsyncOutputItemsWithStreamingResponse)SyncCursorPageAsyncCursorPage)run_list_paramsrun_create_params)AsyncPaginatormake_request_options)Metadata)RunListResponse)RunCancelResponse)RunCreateResponse)RunDeleteResponse)RunRetrieveResponseRuns	AsyncRunsc            	      j   \ rS rSr\SS j5       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SS\	S.             SS jjrSSS\	S.             SS jjrSrg)r)   %   c                ,    [        U R                  5      $ N)r   _clientselfs    \/var/www/html/land-ocr/venv/lib/python3.13/site-packages/openai/resources/evals/runs/runs.pyoutput_itemsRuns.output_items&   s    4<<((    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
)RunsWithRawResponser0   s    r2   with_raw_responseRuns.with_raw_response*   s     #4((r5   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
)RunsWithStreamingResponser0   s    r2   with_streaming_responseRuns.with_streaming_response4   s     )..r5   Nmetadatanameextra_headersextra_query
extra_bodytimeoutc                   U(       d  [        SU< 35      eU R                  SU S3[        UUUS.[        R                  5      [        XVXxS9[        S9$ )  
Kicks off a new run for a given evaluation, specifying the data source, and what
model configuration to use to test. The datasource will be validated against the
schema specified in the config of the evaluation.

Args:
  data_source: Details about the run's data source.

  metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful
      for storing additional information about the object in a structured format, and
      querying for objects via API or the dashboard.

      Keys are strings with a maximum length of 64 characters. Values are strings with
      a maximum length of 512 characters.

  name: The name of the run.

  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
6Expected a non-empty value for `eval_id` but received /evals//runsdata_sourcerA   rB   rC   rD   rE   rF   bodyoptionscast_to)
ValueError_postr   r    RunCreateParamsr"   r&   	r1   eval_idrM   rA   rB   rC   rD   rE   rF   s	            r2   createRuns.create=   su    N UV]U`abbzzgYe$ #. ( 
 "11 )+Q[ &  
 	
r5   rN   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$ )  
Get an evaluation run by ID.

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
rI   5Expected a non-empty value for `run_id` but received rJ   /runs/rN   rQ   rR   rS   _getr"   r(   r1   run_idrW   rC   rD   rE   rF   s          r2   retrieveRuns.retrievev   sm    0 UV]U`abbTU[T^_``yygYfVH-(+Q[ (  
 	
r5   afterlimitorderstatusrC   rD   rE   rF   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$ a  
Get a list of runs for an evaluation.

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

  limit: Number of runs to retrieve.

  order: Sort order for runs by timestamp. Use `asc` for ascending order or `desc` for
      descending order. Defaults to `asc`.

  status: Filter runs by status. One of `queued` | `in_progress` | `failed` | `completed`
      | `canceled`.

  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
rI   rJ   rK   )rf   rg   rh   ri   )rC   rD   rE   rF   query)pagerQ   model)rS   _get_api_listr   r$   r"   r   r   RunListParams
r1   rW   rf   rg   rh   ri   rC   rD   rE   rF   s
             r2   list	Runs.list   s    J UV]U`abb!!gYe$0(+'%%!&!&!&"(	 $11 "% " 
 	
r5   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$ )  
Delete an eval run.

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
rI   r\   rJ   r]   rN   r^   rS   _deleter"   r'   ra   s          r2   deleteRuns.delete   sm    0 UV]U`abbTU[T^_``||gYfVH-(+Q[ &  
 	
r5   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$ )  
Cancel an ongoing evaluation run.

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
rI   r\   rJ   r]   rN   r^   rS   rT   r"   r%   ra   s          r2   cancelRuns.cancel   sm    0 UV]U`abbTU[T^_``zzgYfVH-(+Q[ &  
 	
r5    )returnr   )r   r8   )r   r=   rW   strrM   zrun_create_params.DataSourcerA   zOptional[Metadata] | OmitrB   
str | OmitrC   Headers | NonerD   Query | NonerE   Body | NonerF   'float | httpx.Timeout | None | NotGivenr   r&   rb   r   rW   r   rC   r   rD   r   rE   r   rF   r   r   r(   )rW   r   rf   r   rg   
int | Omitrh   Literal['asc', 'desc'] | Omitri   JLiteral['queued', 'in_progress', 'completed', 'canceled', 'failed'] | OmitrC   r   rD   r   rE   r   rF   r   r   zSyncCursorPage[RunListResponse]rb   r   rW   r   rC   r   rD   r   rE   r   rF   r   r   r'   rb   r   rW   r   rC   r   rD   r   rE   r   rF   r   r   r%   __name__
__module____qualname____firstlineno__r   r3   r9   r>   r   r   rX   rc   rr   rx   r}   __static_attributes__r   r5   r2   r)   r)   %   sA   ) ) ) ) / / /3 )-$("&;D7
7
 2	7

 ,7
 7
 &7
 "7
  7
 97
 
7
@ )-$("&;D"
"
 	"
 &"
 ""
  "
 9"
 
"
P ! /3]a )-$("&;D:
:
 	:

 :
 -:
 [:
 &:
 ":
  :
 9:
 
):
F )-$("&;D"
"
 	"
 &"
 ""
  "
 9"
 
"
V )-$("&;D"
"
 	"
 &"
 ""
  "
 9"
 
"
 "
r5   c            	      j   \ rS rSr\SS j5       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SS\	S.             SS jjrSSS\	S.             SS jjrSrg)r*   i  c                ,    [        U R                  5      $ r.   )r   r/   r0   s    r2   r3   AsyncRuns.output_items   s    --r5   c                    [        U 5      $ r7   )AsyncRunsWithRawResponser0   s    r2   r9   AsyncRuns.with_raw_response$  s     (--r5   c                    [        U 5      $ r<   )AsyncRunsWithStreamingResponser0   s    r2   r>   !AsyncRuns.with_streaming_response.  s     .d33r5   Nr@   c                  #    U(       d  [        SU< 35      eU R                  SU S3[        UUUS.[        R                  5      I Sh  vN [        XVXxS9[        S9I Sh  vN $  N N7f)rH   rI   rJ   rK   rL   NrN   rO   )rS   rT   r   r    rU   r"   r&   rV   s	            r2   rX   AsyncRuns.create7  s     N UV]U`abbZZgYe$,#. ( 
 "11  )+Q[ &   
 
 	

s$   AA+
A'
A+"A)#A+)A+rN   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[   rI   r\   rJ   r]   rN   r^   Nr_   ra   s          r2   rc   AsyncRuns.retrievep  sz     0 UV]U`abbTU[T^_``YYgYfVH-(+Q[ (  
 
 	
 
   AAAAre   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$ rk   )rS   ro   r   r$   r"   r   r   rp   rq   s
             r2   rr   AsyncRuns.list  s    J UV]U`abb!!gYe$ 1(+'%%!&!&!&"(	 $11 "% " 
 	
r5   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)ru   rI   r\   rJ   r]   rN   r^   Nrv   ra   s          r2   rx   AsyncRuns.delete  sz     0 UV]U`abbTU[T^_``\\gYfVH-(+Q[ & " 
 
 	
 
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I Sh  vN $  N7f)r{   rI   r\   rJ   r]   rN   r^   Nr|   ra   s          r2   r}   AsyncRuns.cancel  sz     0 UV]U`abbTU[T^_``ZZgYfVH-(+Q[ &   
 
 	
 
r   r   )r   r   )r   r   )r   r   r   r   )rW   r   rf   r   rg   r   rh   r   ri   r   rC   r   rD   r   rE   r   rF   r   r   zAAsyncPaginator[RunListResponse, AsyncCursorPage[RunListResponse]]r   r   r   r   r5   r2   r*   r*     sB   . . . . 4 4 /3 )-$("&;D7
7
 2	7

 ,7
 7
 &7
 "7
  7
 97
 
7
@ )-$("&;D"
"
 	"
 &"
 ""
  "
 9"
 
"
P ! /3]a )-$("&;D:
:
 	:

 :
 -:
 [:
 &:
 ":
  :
 9:
 
K:
F )-$("&;D"
"
 	"
 &"
 ""
  "
 9"
 
"
V )-$("&;D"
"
 	"
 &"
 ""
  "
 9"
 
"
 "
r5   c                  2    \ rS rSrSS jr\SS j5       rSrg)r8   i  c                   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        [        R                  " UR                  5      U l        g r.   )_runsr   to_raw_response_wrapperrX   rc   rr   rx   r}   r1   runss     r2   __init__RunsWithRawResponse.__init__  s    
&>>KK
 )@@MM
 %<<II
	 '>>KK
 '>>KK
r5   c                @    [        U R                  R                  5      $ r.   )r   r   r3   r0   s    r2   r3    RunsWithRawResponse.output_items-  s    )$***A*ABBr5   r   r}   rX   rx   rr   rc   Nr   r)   r   None)r   r   r   r   r   r   r   r   r3   r   r   r5   r2   r8   r8     s    
& C Cr5   r8   c                  2    \ rS rSrSS jr\SS j5       rSrg)r   i2  c                   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        [        R                  " UR                  5      U l        g r.   )r   r   async_to_raw_response_wrapperrX   rc   rr   rx   r}   r   s     r2   r   !AsyncRunsWithRawResponse.__init__3  s    
&DDKK
 )FFMM
 %BBII
	 'DDKK
 'DDKK
r5   c                @    [        U R                  R                  5      $ r.   )r   r   r3   r0   s    r2   r3   %AsyncRunsWithRawResponse.output_itemsF  s    .tzz/F/FGGr5   r   Nr   r*   r   r   )r   r   r   r   r5   r2   r   r   2  s    
& H Hr5   r   c                  2    \ rS rSrSS jr\SS j5       rSrg)r=   iK  c                   Xl         [        UR                  5      U 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   rX   rc   rr   rx   r}   r   s     r2   r   "RunsWithStreamingResponse.__init__L  sn    
2KK
 5MM
 1II
	 3KK
 3KK
r5   c                @    [        U R                  R                  5      $ r.   )r   r   r3   r0   s    r2   r3   &RunsWithStreamingResponse.output_items_  s    /

0G0GHHr5   r   Nr   )r   r   r   r   r5   r2   r=   r=   K  s    
& I Ir5   r=   c                  2    \ rS rSrSS jr\SS j5       rSrg)r   id  c                   Xl         [        UR                  5      U 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   rX   rc   rr   rx   r}   r   s     r2   r   'AsyncRunsWithStreamingResponse.__init__e  sn    
8KK
 ;MM
 7II
	 9KK
 9KK
r5   c                @    [        U R                  R                  5      $ r.   )r   r   r3   r0   s    r2   r3   +AsyncRunsWithStreamingResponse.output_itemsx  s    4TZZ5L5LMMr5   r   Nr   )r   r   r   r   r5   r2   r   r   d  s    
& N Nr5   r   )?
__future__r   typingr   typing_extensionsr   httpx r   _typesr   r	   r
   r   r   r   r   _utilsr   r   _compatr   	_resourcer   r   	_responser   r   r3   r   r   r   r   r   r   
paginationr   r   types.evalsr   r    _base_clientr!   r"   types.shared_params.metadatar#   types.evals.run_list_responser$   types.evals.run_cancel_responser%   types.evals.run_create_responser&   types.evals.run_delete_responser'   !types.evals.run_retrieve_responser(   __all__r)   r*   r8   r   r=   r   r   r5   r2   <module>r      s    #  %  ! L L L = ' ; Z  ; > A 5 = A A A E;
w
? w
tw
  w
tC C2H H2I I2N Nr5   