o
    ¨Ýja#  ã                   @  sH  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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„ 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ƒZ0dS )é    )Úannotations)ÚAnyÚListÚcast)Ú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)Úinput_item_list_params)ÚResponseItem)ÚResponseIncludableÚ
InputItemsÚAsyncInputItemsc                	   @  óJ   e Zd ZdZed dd„ƒZed!dd„ƒZeeeed	d	d	ed
œd"dd„Z	d	S )#r   ú"Create and manage model responses.ÚreturnÚInputItemsWithRawResponsec                 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(   úa/var/www/html/chatgpt/venv/lib/python3.10/site-packages/openai/resources/responses/input_items.pyÚwith_raw_response   ó   zInputItems.with_raw_responseÚInputItemsWithStreamingResponsec                 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"InputItems.with_streaming_responseN©ÚafterÚincludeÚlimitÚorderÚextra_headersÚextra_queryÚ
extra_bodyÚtimeoutÚresponse_idÚstrr1   ú
str | Omitr2   úList[ResponseIncludable] | Omitr3   ú
int | Omitr4   úLiteral['asc', 'desc'] | Omitr5   úHeaders | Noner6   úQuery | Noner7   úBody | Noner8   ú(float | httpx2.Timeout | None | NotGivenúSyncCursorPage[ResponseItem]c          
      C  ó\   |s	t d|›�ƒ‚| jtd|d�tt t||||	t||||dœtjƒddi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.

          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/{response_id}/input_items)r9   )r1   r2   r3   r4   Zbearer_authT)r5   r6   r7   r8   ÚqueryÚsecurity)ÚpageÚoptionsÚmodel)Ú
ValueErrorÚ_get_api_listr   r   r   r   r   r   ÚInputItemListParamsr   r   ©
r'   r9   r1   r2   r3   r4   r5   r6   r7   r8   r(   r(   r)   Úlist/   ó,   (
üù	òízInputItems.list)r"   r#   )r"   r,   )r9   r:   r1   r;   r2   r<   r3   r=   r4   r>   r5   r?   r6   r@   r7   rA   r8   rB   r"   rC   ©
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r*   r.   r   r   rO   r(   r(   r(   r)   r      ó    	óc                	   @  r    )#r   r!   r"   ÚAsyncInputItemsWithRawResponsec                 C  r$   r%   )rW   r&   r(   r(   r)   r*   s   r+   z!AsyncInputItems.with_raw_responseÚ$AsyncInputItemsWithStreamingResponsec                 C  r$   r-   )rX   r&   r(   r(   r)   r.   }   r/   z'AsyncInputItems.with_streaming_responseNr0   r9   r:   r1   r;   r2   r<   r3   r=   r4   r>   r5   r?   r6   r@   r7   rA   r8   rB   ú;AsyncPaginator[ResponseItem, AsyncCursorPage[ResponseItem]]c          
      C  rD   rE   )rK   rL   r   r   r   r   r   r   rM   r   r   rN   r(   r(   r)   rO   †   rP   zAsyncInputItems.list)r"   rW   )r"   rX   )r9   r:   r1   r;   r2   r<   r3   r=   r4   r>   r5   r?   r6   r@   r7   rA   r8   rB   r"   rY   rQ   r(   r(   r(   r)   r   p   rV   c                   @  ó   e Zd Zddd„ZdS )	r#   Úinput_itemsr   r"   ÚNonec                 C  ó   || _ t |j¡| _d S ©N)Ú_input_itemsr   Zto_raw_response_wrapperrO   ©r'   r[   r(   r(   r)   Ú__init__È   ó   
ÿz"InputItemsWithRawResponse.__init__N©r[   r   r"   r\   ©rR   rS   rT   ra   r(   r(   r(   r)   r#   Ç   ó    r#   c                   @  rZ   )	rW   r[   r   r"   r\   c                 C  r]   r^   )r_   r   Zasync_to_raw_response_wrapperrO   r`   r(   r(   r)   ra   Ñ   rb   z'AsyncInputItemsWithRawResponse.__init__N©r[   r   r"   r\   rd   r(   r(   r(   r)   rW   Ð   re   rW   c                   @  rZ   )	r,   r[   r   r"   r\   c                 C  ó   || _ t|jƒ| _d S r^   )r_   r   rO   r`   r(   r(   r)   ra   Ú   ó   
ÿz(InputItemsWithStreamingResponse.__init__Nrc   rd   r(   r(   r(   r)   r,   Ù   re   r,   c                   @  rZ   )	rX   r[   r   r"   r\   c                 C  rg   r^   )r_   r   rO   r`   r(   r(   r)   ra   ã   rh   z-AsyncInputItemsWithStreamingResponse.__init__Nrf   rd   r(   r(   r(   r)   rX   â   re   rX   )1Ú
__future__r   Útypingr   r   r   Ztyping_extensionsr   Zhttpx2Ú r   Ú_typesr	   r
   r   r   r   r   r   Z_utilsr   r   Z_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#   rW   r,   rX   r(   r(   r(   r)   Ú<module>   s,   $WW			