U
    ·ÜŸj¼#  ã                   @  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-2qj3ofc_/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 `asc`.

              - `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   Ú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			