
    2ib1                    z   d dl mZ 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 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l#m$Z$ ddgZ% G d de          Z& G d de          Z' G d d          Z( G d d          Z) G d d          Z* G d d          Z+dS )    )annotations)LiteralN   )_legacy_response)BodyOmitQueryHeadersNotGivenomit	not_given)maybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)SyncCursorPageAsyncCursorPage)AsyncPaginatormake_request_options)output_item_list_params)OutputItemListResponse)OutputItemRetrieveResponseOutputItemsAsyncOutputItemsc            	      r    e Zd ZdZed"d            Zed#d            Zdddedd$dZe	e	e	e	dddedd%d!Z
dS )&r   ,Manage and run evals in the OpenAI platform.returnOutputItemsWithRawResponsec                     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    selfs    o/root/.openclaw/workspace/.venv-openai/lib/python3.11/site-packages/openai/resources/evals/runs/output_items.pywith_raw_responsezOutputItems.with_raw_response   s     *$///     OutputItemsWithStreamingResponsec                     t          |           S 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#   s    r%   with_streaming_responsez#OutputItems.with_streaming_response%   s     0555r'   Nextra_headersextra_query
extra_bodytimeoutoutput_item_idstreval_idrun_idr-   Headers | Noner.   Query | Noner/   Body | Noner0   'float | httpx.Timeout | None | NotGivenr   c          	         |st          d|          |st          d|          |st          d|          |                     d| d| d| t          ||||          t                    S )	\  
        Get an evaluation run output item 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
        6Expected a non-empty value for `eval_id` but received 5Expected a non-empty value for `run_id` but received =Expected a non-empty value for `output_item_id` but received /evals//runs//output_items/r,   optionscast_to
ValueError_getr   r   r$   r1   r3   r4   r-   r.   r/   r0   s           r%   retrievezOutputItems.retrieve.   s    2  	caV]aabbb 	a_U[__``` 	qo]koopppyyKgKKVKK>KK(+Q[el   /  
 
 	
r'   afterlimitorderstatusr-   r.   r/   r0   rJ   
str | OmitrK   
int | OmitrL   Literal['asc', 'desc'] | OmitrM   Literal['fail', 'pass'] | Omit&SyncCursorPage[OutputItemListResponse]c       	           |st          d|          |st          d|          |                     d| d| dt          t                   t	          |||	|
t          ||||dt          j                            t                    S 	a,  
        Get a list of output items for an evaluation run.

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

          limit: Number of output items to retrieve.

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

          status: Filter output items by status. Use `failed` to filter by failed output items or
              `pass` to filter by passed output items.

          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>   r?   z/output_items)rJ   rK   rL   rM   )r-   r.   r/   r0   query)pagerB   model)rE   _get_api_listr   r   r   r   r   OutputItemListParamsr$   r4   r3   rJ   rK   rL   rM   r-   r.   r/   r0   s              r%   listzOutputItems.listU   s    L  	caV]aabbb 	a_U[__```!!:g::V::: 67(+'%%!&!&!&"(	  ,@    )% " 
 
 	
r'   )r   r    )r   r(   r1   r2   r3   r2   r4   r2   r-   r5   r.   r6   r/   r7   r0   r8   r   r   )r4   r2   r3   r2   rJ   rN   rK   rO   rL   rP   rM   rQ   r-   r5   r.   r6   r/   r7   r0   r8   r   rR   __name__
__module____qualname____doc__r   r&   r+   r   rH   r   r[    r'   r%   r   r      s        660 0 0 _0 6 6 6 _6  )-$("&;D%
 %
 %
 %
 %
 %
X ! /315 )-$("&;D=
 =
 =
 =
 =
 =
 =
 =
r'   c            	      r    e Zd ZdZed"d            Zed#d            Zdddedd$dZe	e	e	e	dddedd%d!Z
dS )&r   r   r   AsyncOutputItemsWithRawResponsec                     t          |           S r"   )rd   r#   s    r%   r&   z"AsyncOutputItems.with_raw_response   s     /t444r'   %AsyncOutputItemsWithStreamingResponsec                     t          |           S r*   )rf   r#   s    r%   r+   z(AsyncOutputItems.with_streaming_response   s     5T:::r'   Nr,   r1   r2   r3   r4   r-   r5   r.   r6   r/   r7   r0   r8   r   c          	        K   |st          d|          |st          d|          |st          d|          |                     d| d| d| t          ||||          t                     d	{V S )
r:   r;   r<   r=   r>   r?   r@   r,   rA   NrD   rG   s           r%   rH   zAsyncOutputItems.retrieve   s      2  	caV]aabbb 	a_U[__``` 	qo]koopppYYKgKKVKK>KK(+Q[el   /  
 
 
 
 
 
 
 
 	
r'   rI   rJ   rN   rK   rO   rL   rP   rM   rQ   OAsyncPaginator[OutputItemListResponse, AsyncCursorPage[OutputItemListResponse]]c       	           |st          d|          |st          d|          |                     d| d| dt          t                   t	          |||	|
t          ||||dt          j                            t                    S rT   )rE   rX   r   r   r   r   r   rY   rZ   s              r%   r[   zAsyncOutputItems.list   s    L  	caV]aabbb 	a_U[__```!!:g::V::: !78(+'%%!&!&!&"(	  ,@    )% " 
 
 	
r'   )r   rd   )r   rf   r\   )r4   r2   r3   r2   rJ   rN   rK   rO   rL   rP   rM   rQ   r-   r5   r.   r6   r/   r7   r0   r8   r   ri   r]   rb   r'   r%   r   r      s        665 5 5 _5 ; ; ; _;  )-$("&;D%
 %
 %
 %
 %
 %
X ! /315 )-$("&;D=
 =
 =
 =
 =
 =
 =
 =
r'   c                      e Zd ZddZdS )r    output_itemsr   r   Nonec                    || _         t          j        |j                  | _        t          j        |j                  | _        d S N)_output_itemsr   to_raw_response_wrapperrH   r[   r$   rl   s     r%   __init__z#OutputItemsWithRawResponse.__init__  sD    )(@!
 
 %<
 
			r'   Nrl   r   r   rm   r^   r_   r`   rs   rb   r'   r%   r    r      (        
 
 
 
 
 
r'   r    c                      e Zd ZddZdS )rd   rl   r   r   rm   c                    || _         t          j        |j                  | _        t          j        |j                  | _        d S ro   )rp   r   async_to_raw_response_wrapperrH   r[   rr   s     r%   rs   z(AsyncOutputItemsWithRawResponse.__init__  sD    )(F!
 
 %B
 
			r'   Nrl   r   r   rm   ru   rb   r'   r%   rd   rd     rv   r'   rd   c                      e Zd ZddZdS )r(   rl   r   r   rm   c                x    || _         t          |j                  | _        t          |j                  | _        d S ro   )rp   r   rH   r[   rr   s     r%   rs   z)OutputItemsWithStreamingResponse.__init__+  s>    )4!
 
 1
 
			r'   Nrt   ru   rb   r'   r%   r(   r(   *  rv   r'   r(   c                      e Zd ZddZdS )rf   rl   r   r   rm   c                x    || _         t          |j                  | _        t          |j                  | _        d S ro   )rp   r   rH   r[   rr   s     r%   rs   z.AsyncOutputItemsWithStreamingResponse.__init__7  s>    ):!
 
 7
 
			r'   Nrz   ru   rb   r'   r%   rf   rf   6  rv   r'   rf   ),
__future__r   typing_extensionsr   httpx r   _typesr   r   r	   r
   r   r   r   _utilsr   _compatr   	_resourcer   r   	_responser   r   
paginationr   r   _base_clientr   r   types.evals.runsr   *types.evals.runs.output_item_list_responser   .types.evals.runs.output_item_retrieve_responser   __all__r   r   r    rd   r(   rf   rb   r'   r%   <module>r      sR   # " " " " " % % % % % %  ! ! ! ! ! ! L L L L L L L L L L L L L L L L L L & & & & & & ' ' ' ' ' ' ; ; ; ; ; ; ; ; Z Z Z Z Z Z Z Z : : : : : : : : A A A A A A A A 8 8 8 8 8 8 Q Q Q Q Q Q Y Y Y Y Y Y,
-z
 z
 z
 z
 z
/ z
 z
 z
zz
 z
 z
 z
 z
' z
 z
 z
z	
 	
 	
 	
 	
 	
 	
 	
	
 	
 	
 	
 	
 	
 	
 	
	
 	
 	
 	
 	
 	
 	
 	
	
 	
 	
 	
 	
 	
 	
 	
 	
 	
r'   