U
    ~fh#                     @  s<  d dl mZ d dlmZmZ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)AnyListcast)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)input_item_list_params)ResponseItem)ResponseIncludable
InputItemsAsyncInputItemsc                   @  sh   e Zd ZeddddZeddddZeeeeeddded		d
dddddddddddddZdS )r   InputItemsWithRawResponsereturnc                 C  s   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#   J/tmp/pip-unpacked-wheel-rjiviquo/openai/resources/responses/input_items.pywith_raw_response   s    zInputItems.with_raw_responseInputItemsWithStreamingResponsec                 C  s   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!   r#   r#   r$   with_streaming_response$   s    z"InputItems.with_streaming_responseN	afterbeforeincludelimitorderextra_headersextra_query
extra_bodytimeoutstrstr | NotGiven#List[ResponseIncludable] | NotGivenint | NotGiven#Literal[('asc', 'desc')] | NotGivenHeaders | NoneQuery | NoneBody | None'float | httpx.Timeout | None | NotGivenzSyncCursorPage[ResponseItem]response_idr*   r+   r,   r-   r.   r/   r0   r1   r2   r   c       	         C  sX   |st d|| jd| dtt t|||	|
t|||||dtjdtt	tdS a  
        Returns a list of input items for a given response.

        Args:
          after: An item ID to list items after, used in pagination.

          before: An item ID to list items before, used in pagination.

          include: Additional fields to include in the response. See the `include` parameter for
              Response creation above for more information.

          limit: A limit on the number of objects to be returned. Limit can range between 1 and
              100, and the default is 20.

          order: The order to return the input items in. Default is `desc`.

              - `asc`: Return the input items in ascending order.
              - `desc`: Return the input items in descending order.

          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
        z:Expected a non-empty value for `response_id` but received z/responses/z/input_items)r*   r+   r,   r-   r.   )r/   r0   r1   r2   query)pageoptionsmodel)

ValueError_get_api_listr   r   r   r   r   InputItemListParamsr   r   r"   r=   r*   r+   r,   r-   r.   r/   r0   r1   r2   r#   r#   r$   list-   s,    +
zInputItems.list__name__
__module____qualname__r   r%   r(   r	   rG   r#   r#   r#   r$   r      s   	c                   @  sh   e Zd ZeddddZeddddZeeeeeddded		d
dddddddddddddZdS )r   AsyncInputItemsWithRawResponser   c                 C  s   t | S r    )rL   r!   r#   r#   r$   r%   r   s    z!AsyncInputItems.with_raw_response$AsyncInputItemsWithStreamingResponsec                 C  s   t | S r'   )rM   r!   r#   r#   r$   r(   |   s    z'AsyncInputItems.with_streaming_responseNr)   r3   r4   r5   r6   r7   r8   r9   r:   r;   z;AsyncPaginator[ResponseItem, AsyncCursorPage[ResponseItem]]r<   c       	         C  sX   |st d|| jd| dtt t|||	|
t|||||dtjdtt	tdS r>   )
rC   rD   r   r   r   r   r   rE   r   r   rF   r#   r#   r$   rG      s,    +
zAsyncInputItems.listrH   r#   r#   r#   r$   r   q   s   	c                   @  s   e Zd ZdddddZdS )r   r   Noneinput_itemsr   c                 C  s   || _ t|j| _d S N)_input_itemsr   Zto_raw_response_wrapperrG   r"   rP   r#   r#   r$   __init__   s    z"InputItemsWithRawResponse.__init__NrI   rJ   rK   rT   r#   r#   r#   r$   r      s   r   c                   @  s   e Zd ZdddddZdS )rL   r   rN   rO   c                 C  s   || _ t|j| _d S rQ   )rR   r   Zasync_to_raw_response_wrapperrG   rS   r#   r#   r$   rT      s    z'AsyncInputItemsWithRawResponse.__init__NrU   r#   r#   r#   r$   rL      s   rL   c                   @  s   e Zd ZdddddZdS )r&   r   rN   rO   c                 C  s   || _ t|j| _d S rQ   )rR   r   rG   rS   r#   r#   r$   rT      s    z(InputItemsWithStreamingResponse.__init__NrU   r#   r#   r#   r$   r&      s   r&   c                   @  s   e Zd ZdddddZdS )rM   r   rN   rO   c                 C  s   || _ t|j| _d S rQ   )rR   r   rG   rS   r#   r#   r$   rT      s    z-AsyncInputItemsWithStreamingResponse.__init__NrU   r#   r#   r#   r$   rM      s   rM   ).
__future__r   typingr   r   r   Ztyping_extensionsr   Zhttpx r   _typesr	   r
   r   r   r   _utilsr   _compatr   Z	_resourcer   r   	_responser   r   Z
paginationr   r   Z_base_clientr   r   Ztypes.responsesr   Ztypes.responses.response_itemr   Z#types.responses.response_includabler   __all__r   r   r   rL   r&   rM   r#   r#   r#   r$   <module>   s*   XX			