
    2Rj'4                    X   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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,y)    )annotations)LiteralN   )_legacy_response)BodyOmitQueryHeadersNotGivenomit	not_given)path_template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            	          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
y)r   ,Manage and run evals in the OpenAI platform.c                    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
        )OutputItemsWithRawResponseselfs    p/var/www/html/meridian/meridian-ai/venv/lib/python3.12/site-packages/openai/resources/evals/runs/output_items.pywith_raw_responsezOutputItems.with_raw_response   s     *$//    c                    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
        ) OutputItemsWithStreamingResponser#   s    r%   with_streaming_responsez#OutputItems.with_streaming_response%   s     055r'   Nextra_headersextra_query
extra_bodytimeoutc                   |st        d|      |st        d|      |st        d|      | j                  t        d|||      t        ||||ddi      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/{eval_id}/runs/{run_id}/output_items/{output_item_id}eval_idrun_idoutput_item_idbearer_authTr-   r.   r/   r0   securityoptionscast_to
ValueError_getr   r   r   r$   r:   r8   r9   r-   r.   r/   r0   s           r%   retrievezOutputItems.retrieve.   s    2 UV]U`abbTU[T^_``\]k\noppyyN-	 )+'%'. /  
 	
r'   afterlimitorderstatusr-   r.   r/   r0   c       	            |st        d|      |st        d|      | j                  t        d||      t        t           t        |||	|
t        ||||dt        j                        ddi      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
        r3   r4   z+/evals/{eval_id}/runs/{run_id}/output_items)r8   r9   )rG   rH   rI   rJ   r;   T)r-   r.   r/   r0   queryr=   )pager?   model)	rB   _get_api_listr   r   r   r   r   r   OutputItemListParamsr$   r9   r8   rG   rH   rI   rJ   r-   r.   r/   r0   s              r%   listzOutputItems.list^   s    L UV]U`abbTU[T^_``!!GQXagh 67(+'%%!&!&!&"(	 ,@@ (.  )' " 
 	
r'   )returnr"   )rT   r*   r:   strr8   rV   r9   rV   r-   Headers | Noner.   Query | Noner/   Body | Noner0   'float | httpx.Timeout | None | NotGivenrT   r   )r9   rV   r8   rV   rG   
str | OmitrH   
int | OmitrI   Literal['asc', 'desc'] | OmitrJ   Literal['fail', 'pass'] | Omitr-   rW   r.   rX   r/   rY   r0   rZ   rT   z&SyncCursorPage[OutputItemListResponse]__name__
__module____qualname____doc__r   r&   r+   r   rE   r   rS    r'   r%   r   r      s   60 0 6 6  )-$("&;D.
.
 	.

 .
 &.
 ".
  .
 9.
 
$.
j ! /315 )-$("&;D>
>
 	>

 >
 >
 ->
 />
 &>
 ">
  >
 9>
 
0>
r'   c            	          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
y)r   r   c                    t        |       S r!   )AsyncOutputItemsWithRawResponser#   s    r%   r&   z"AsyncOutputItems.with_raw_response   s     /t44r'   c                    t        |       S r)   )%AsyncOutputItemsWithStreamingResponser#   s    r%   r+   z(AsyncOutputItems.with_streaming_response   s     5T::r'   Nr,   c                  K   |st        d|      |st        d|      |st        d|      | j                  t        d|||      t        ||||ddi      t        	       d
{   S 7 w)r2   r3   r4   r5   r6   r7   r;   Tr<   r>   NrA   rD   s           r%   rE   zAsyncOutputItems.retrieve   s     2 UV]U`abbTU[T^_``\]k\noppYYN-	 )+'%'. /  
 
 	
 
s   A)A2+A0,A2rF   c       	            |st        d|      |st        d|      | j                  t        d||      t        t           t        |||	|
t        ||||dt        j                        ddi      t        	      S rL   )	rB   rP   r   r   r   r   r   r   rQ   rR   s              r%   rS   zAsyncOutputItems.list   s    L UV]U`abbTU[T^_``!!GQXagh !78(+'%%!&!&!&"(	 ,@@ (.  )' " 
 	
r'   )rT   rg   )rT   ri   rU   )r9   rV   r8   rV   rG   r[   rH   r\   rI   r]   rJ   r^   r-   rW   r.   rX   r/   rY   r0   rZ   rT   zOAsyncPaginator[OutputItemListResponse, AsyncCursorPage[OutputItemListResponse]]r_   rd   r'   r%   r   r      s   65 5 ; ;  )-$("&;D.
.
 	.

 .
 &.
 ".
  .
 9.
 
$.
j ! /315 )-$("&;D>
>
 	>

 >
 >
 ->
 />
 &>
 ">
  >
 9>
 
Y>
r'   c                      e Zd ZddZy)r"   c                    || _         t        j                  |j                        | _        t        j                  |j                        | _        y N)_output_itemsr   to_raw_response_wrapperrE   rS   r$   output_itemss     r%   __init__z#OutputItemsWithRawResponse.__init__'  sB    )(@@!!
 %<<
	r'   Nrr   r   rT   Noner`   ra   rb   rs   rd   r'   r%   r"   r"   &      
r'   r"   c                      e Zd ZddZy)rg   c                    || _         t        j                  |j                        | _        t        j                  |j                        | _        y rn   )ro   r   async_to_raw_response_wrapperrE   rS   rq   s     r%   rs   z(AsyncOutputItemsWithRawResponse.__init__3  sB    )(FF!!
 %BB
	r'   Nrr   r   rT   ru   rv   rd   r'   r%   rg   rg   2  rw   r'   rg   c                      e Zd ZddZy)r*   c                z    || _         t        |j                        | _        t        |j                        | _        y rn   )ro   r   rE   rS   rq   s     r%   rs   z)OutputItemsWithStreamingResponse.__init__?  s6    )4!!
 1
	r'   Nrt   rv   rd   r'   r%   r*   r*   >  rw   r'   r*   c                      e Zd ZddZy)ri   c                z    || _         t        |j                        | _        t        |j                        | _        y rn   )ro   r   rE   rS   rq   s     r%   rs   z.AsyncOutputItemsWithStreamingResponse.__init__K  s6    ):!!
 7
	r'   Nr{   rv   rd   r'   r%   ri   ri   J  rw   r'   ri   )-
__future__r   typing_extensionsr   httpx r   _typesr   r   r	   r
   r   r   r   _utilsr   r   _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"   rg   r*   ri   rd   r'   r%   <module>r      s    # %  ! L L L 5 ' ; Z : A 8 Q Y,
-D
/ D
ND
' D
N	
 	
	
 	
	
 	
	
 	
r'   