o
    /wi.1                     @  s(  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 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 deZ$G dd deZ%G dd dZ&G dd dZ'G dd dZ(G dd dZ)dS )    )annotations)LiteralN   )_legacy_response)	NOT_GIVENBodyQueryHeadersNotGiven)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ed%ddZed&ddZddded	d'ddZeeeedddedd(d#d$ZdS ))r   returnOutputItemsWithRawResponsec                 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
        )r   self r!   e/home/ubuntu/sommelier/.venv/lib/python3.10/site-packages/openai/resources/evals/runs/output_items.pywith_raw_response      zOutputItems.with_raw_response OutputItemsWithStreamingResponsec                 C  r   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   r!   r!   r"   with_streaming_response#      z#OutputItems.with_streaming_responseNextra_headersextra_query
extra_bodytimeoutoutput_item_idstreval_idrun_idr*   Headers | Noner+   Query | Noner,   Body | Noner-   'float | httpx.Timeout | None | NotGivenr   c                C  sd   |s	t d||st d||st d|| jd| d| d| t||||dtd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    r.   r0   r1   r*   r+   r,   r-   r!   r!   r"   retrieve,   s   zOutputItems.retrieveafterlimitorderstatusr*   r+   r,   r-   rF   str | NotGivenrG   int | NotGivenrH   !Literal['asc', 'desc'] | NotGivenrI   "Literal['fail', 'pass'] | NotGiven&SyncCursorPage[OutputItemListResponse]c       	         C  h   |s	t d||st d|| jd| d| dtt t|||	|
t||||dtjdtd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
        r7   r8   r:   r;   z/output_items)rF   rG   rH   rI   )r*   r+   r,   r-   query)pager>   model)rA   _get_api_listr   r   r   r   r   OutputItemListParamsr    r1   r0   rF   rG   rH   rI   r*   r+   r,   r-   r!   r!   r"   listS   .   &zOutputItems.list)r   r   )r   r%   r.   r/   r0   r/   r1   r/   r*   r2   r+   r3   r,   r4   r-   r5   r   r   )r1   r/   r0   r/   rF   rJ   rG   rK   rH   rL   rI   rM   r*   r2   r+   r3   r,   r4   r-   r5   r   rN   	__name__
__module____qualname__r   r#   r'   r   rD   rW   r!   r!   r!   r"   r      &    	,c                	   @  r   ))r   r   AsyncOutputItemsWithRawResponsec                 C  r   r   )r_   r   r!   r!   r"   r#      r$   z"AsyncOutputItems.with_raw_response%AsyncOutputItemsWithStreamingResponsec                 C  r   r&   )r`   r   r!   r!   r"   r'      r(   z(AsyncOutputItems.with_streaming_responseNr)   r.   r/   r0   r1   r*   r2   r+   r3   r,   r4   r-   r5   r   c                  sl   |s
t d||st d||st d|| jd| d| d| t||||dtdI d	H S )
r6   r7   r8   r9   r:   r;   r<   r)   r=   Nr@   rC   r!   r!   r"   rD      s   zAsyncOutputItems.retrieverE   rF   rJ   rG   rK   rH   rL   rI   rM   OAsyncPaginator[OutputItemListResponse, AsyncCursorPage[OutputItemListResponse]]c       	         C  rO   rP   )rA   rT   r   r   r   r   r   rU   rV   r!   r!   r"   rW      rX   zAsyncOutputItems.list)r   r_   )r   r`   rY   )r1   r/   r0   r/   rF   rJ   rG   rK   rH   rL   rI   rM   r*   r2   r+   r3   r,   r4   r-   r5   r   ra   rZ   r!   r!   r!   r"   r      r^   c                   @     e Zd ZdddZdS )	r   output_itemsr   r   Nonec                 C  &   || _ t|j| _t|j| _d S N)_output_itemsr   to_raw_response_wrapperrD   rW   r    rc   r!   r!   r"   __init__     
z#OutputItemsWithRawResponse.__init__Nrc   r   r   rd   r[   r\   r]   rj   r!   r!   r!   r"   r         r   c                   @  rb   )	r_   rc   r   r   rd   c                 C  re   rf   )rg   r   async_to_raw_response_wrapperrD   rW   ri   r!   r!   r"   rj     rk   z(AsyncOutputItemsWithRawResponse.__init__Nrc   r   r   rd   rm   r!   r!   r!   r"   r_     rn   r_   c                   @  rb   )	r%   rc   r   r   rd   c                 C  "   || _ t|j| _t|j| _d S rf   )rg   r   rD   rW   ri   r!   r!   r"   rj   '     
z)OutputItemsWithStreamingResponse.__init__Nrl   rm   r!   r!   r!   r"   r%   &  rn   r%   c                   @  rb   )	r`   rc   r   r   rd   c                 C  rq   rf   )rg   r   rD   rW   ri   r!   r!   r"   rj   3  rr   z.AsyncOutputItemsWithStreamingResponse.__init__Nrp   rm   r!   r!   r!   r"   r`   2  rn   r`   )*
__future__r   typing_extensionsr   httpx r   _typesr   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   r_   r%   r`   r!   r!   r!   r"   <module>   s*   {{