
    hb^                       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  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K.J/r/  SSK0J1r1  SSK2J3r3  SSK4J5r5  SS/r6 " S S\5      r7 " S S\5      r8 " S S5      r9 " S S5      r: " S S 5      r; " S! S"5      r<g)#    )annotations)Optional)LiteralN   )_legacy_response)	NOT_GIVENBodyQueryHeadersNotGiven)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    R/var/www/html/env/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
)RunsWithRawResponser.   s    r0   with_raw_responseRuns.with_raw_response-   s     #4((r3   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
)RunsWithStreamingResponser.   s    r0   with_streaming_responseRuns.with_streaming_response7   s     )..r3   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$ )  Create a new evaluation run.

This is the endpoint that will kick off grading.

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_sourcer?   r@   rA   rB   rC   rD   bodyoptionscast_to)
ValueError_postr   r   RunCreateParamsr    r$   	r/   eval_idrK   r?   r@   rA   rB   rC   rD   s	            r0   createRuns.create@   su    L UV]U`abbzzgYe$ #. ( 
 "11 )+Q[ &  
 	
r3   rL   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
rG   5Expected a non-empty value for `run_id` but received rH   /runs/rL   rO   rP   rQ   _getr    r&   r/   run_idrU   rA   rB   rC   rD   s          r0   retrieveRuns.retrievex   sm    0 UV]U`abbTU[T^_``yygYfVH-(+Q[ (  
 	
r3   afterlimitorderstatusrA   rB   rC   rD   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. Use "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
rG   rH   rI   )rd   re   rf   rg   )rA   rB   rC   rD   query)pagerO   model)rQ   _get_api_listr   r"   r    r   r   RunListParams
r/   rU   rd   re   rf   rg   rA   rB   rC   rD   s
             r0   list	Runs.list   s    J UV]U`abb!!gYe$0(+'%%!&!&!&"(	 $11 "% " 
 	
r3   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
rG   rZ   rH   r[   rL   r\   rQ   _deleter    r%   r_   s          r0   deleteRuns.delete   sm    0 UV]U`abbTU[T^_``||gYfVH-(+Q[ &  
 	
r3   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
rG   rZ   rH   r[   rL   r\   rQ   rR   r    r#   r_   s          r0   cancelRuns.cancel   sm    0 UV]U`abbTU[T^_``zzgYfVH-(+Q[ &  
 	
r3    )returnr   )r~   r6   )r~   r;   rU   strrK   zrun_create_params.DataSourcer?   zOptional[Metadata] | NotGivenr@   str | NotGivenrA   Headers | NonerB   Query | NonerC   Body | NonerD   'float | httpx.Timeout | None | NotGivenr~   r$   r`   r   rU   r   rA   r   rB   r   rC   r   rD   r   r~   r&   )rU   r   rd   r   re   int | NotGivenrf   !Literal['asc', 'desc'] | NotGivenrg   NLiteral['queued', 'in_progress', 'completed', 'canceled', 'failed'] | NotGivenrA   r   rB   r   rC   r   rD   r   r~   zSyncCursorPage[RunListResponse]r`   r   rU   r   rA   r   rB   r   rC   r   rD   r   r~   r%   r`   r   rU   r   rA   r   rB   r   rC   r   rD   r   r~   r#   __name__
__module____qualname____firstlineno__r   r1   r7   r<   r   rV   ra   rp   rv   r{   __static_attributes__r}   r3   r0   r'   r'   (   sA   ) ) ) ) / / 3<( )-$("&;D6
6
 2	6

 06
 6
 &6
 "6
  6
 96
 
6
~ )-$("&;D"
"
 	"
 &"
 ""
  "
 9"
 
"
P !* )3<aj )-$("&;D:
:
 	:

 :
 1:
 _:
 &:
 ":
  :
 9:
 
):
F )-$("&;D"
"
 	"
 &"
 ""
  "
 9"
 
"
V )-$("&;D"
"
 	"
 &"
 ""
  "
 9"
 
"
 "
r3   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-   r.   s    r0   r1   AsyncRuns.output_items"  s    --r3   c                    [        U 5      $ r5   )AsyncRunsWithRawResponser.   s    r0   r7   AsyncRuns.with_raw_response&  s     (--r3   c                    [        U 5      $ r:   )AsyncRunsWithStreamingResponser.   s    r0   r<   !AsyncRuns.with_streaming_response0  s     .d33r3   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)rF   rG   rH   rI   rJ   NrL   rM   )rQ   rR   r   r   rS   r    r$   rT   s	            r0   rV   AsyncRuns.create9  s     L UV]U`abbZZgYe$,#. ( 
 "11  )+Q[ &   
 
 	

s$   AA+
A'
A+"A)#A+)A+rL   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)rY   rG   rZ   rH   r[   rL   r\   Nr]   r_   s          r0   ra   AsyncRuns.retrieveq  sz     0 UV]U`abbTU[T^_``YYgYfVH-(+Q[ (  
 
 	
 
   AAAArc   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$ ri   )rQ   rm   r   r"   r    r   r   rn   ro   s
             r0   rp   AsyncRuns.list  s    J UV]U`abb!!gYe$ 1(+'%%!&!&!&"(	 $11 "% " 
 	
r3   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)rs   rG   rZ   rH   r[   rL   r\   Nrt   r_   s          r0   rv   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)ry   rG   rZ   rH   r[   rL   r\   Nrz   r_   s          r0   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   )rU   r   rd   r   re   r   rf   r   rg   r   rA   r   rB   r   rC   r   rD   r   r~   zAAsyncPaginator[RunListResponse, AsyncCursorPage[RunListResponse]]r   r   r   r}   r3   r0   r(   r(   !  sB   . . . . 4 4 3<( )-$("&;D6
6
 2	6

 06
 6
 &6
 "6
  6
 96
 
6
~ )-$("&;D"
"
 	"
 &"
 ""
  "
 9"
 
"
P !* )3<aj )-$("&;D:
:
 	:

 :
 1:
 _:
 &:
 ":
  :
 9:
 
K:
F )-$("&;D"
"
 	"
 &"
 ""
  "
 9"
 
"
V )-$("&;D"
"
 	"
 &"
 ""
  "
 9"
 
"
 "
r3   c                  2    \ rS rSrSS jr\SS j5       rSrg)r6   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_wrapperrV   ra   rp   rv   r{   r/   runss     r0   __init__RunsWithRawResponse.__init__  s    
&>>KK
 )@@MM
 %<<II
	 '>>KK
 '>>KK
r3   c                @    [        U R                  R                  5      $ r,   )r   r   r1   r.   s    r0   r1    RunsWithRawResponse.output_items.  s    )$***A*ABBr3   r   r{   rV   rv   rp   ra   Nr   r'   r~   None)r~   r   r   r   r   r   r   r   r1   r   r}   r3   r0   r6   r6     s    
& C Cr3   r6   c                  2    \ rS rSrSS jr\SS j5       rSrg)r   i3  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_wrapperrV   ra   rp   rv   r{   r   s     r0   r   !AsyncRunsWithRawResponse.__init__4  s    
&DDKK
 )FFMM
 %BBII
	 'DDKK
 'DDKK
r3   c                @    [        U R                  R                  5      $ r,   )r   r   r1   r.   s    r0   r1   %AsyncRunsWithRawResponse.output_itemsG  s    .tzz/F/FGGr3   r   Nr   r(   r~   r   )r~   r   r   r}   r3   r0   r   r   3  s    
& H Hr3   r   c                  2    \ rS rSrSS jr\SS j5       rSrg)r;   iL  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   rV   ra   rp   rv   r{   r   s     r0   r   "RunsWithStreamingResponse.__init__M  sn    
2KK
 5MM
 1II
	 3KK
 3KK
r3   c                @    [        U R                  R                  5      $ r,   )r   r   r1   r.   s    r0   r1   &RunsWithStreamingResponse.output_items`  s    /

0G0GHHr3   r   Nr   )r~   r   r   r}   r3   r0   r;   r;   L  s    
& I Ir3   r;   c                  2    \ rS rSrSS jr\SS j5       rSrg)r   ie  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   rV   ra   rp   rv   r{   r   s     r0   r   'AsyncRunsWithStreamingResponse.__init__f  sn    
8KK
 ;MM
 7II
	 9KK
 9KK
r3   c                @    [        U R                  R                  5      $ r,   )r   r   r1   r.   s    r0   r1   +AsyncRunsWithStreamingResponse.output_itemsy  s    4TZZ5L5LMMr3   r   Nr   )r~   r   r   r}   r3   r0   r   r   e  s    
& N Nr3   r   )=
__future__r   typingr   typing_extensionsr   httpx r   _typesr   r	   r
   r   r   _utilsr   r   _compatr   	_resourcer   r   	_responser   r   r1   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(   r6   r   r;   r   r}   r3   r0   <module>r      s    #  %  ! @ @ ( ; Z  ; > A 5 = A A A E;
v
? v
rv
  v
rC C2H H2I I2N Nr3   