HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/openai/__pycache__/pagination.cpython-310.pyc
o

���g��@s�ddlmZmZmZmZmZmZddlmZm	Z	m
Z
ddlmZm
Z
mZmZgd�Zed�Ze
Gdd�de��ZGd	d
�d
eeeeee�ZGdd�deeeeee�ZGd
d�deeeeee�ZGdd�deeeeee�ZdS)�)�Any�List�Generic�TypeVar�Optional�cast)�Protocol�override�runtime_checkable�)�BasePage�PageInfo�BaseSyncPage�
BaseAsyncPage)�SyncPage�	AsyncPage�SyncCursorPage�AsyncCursorPage�_Tc@seZdZUeeed<dS)�CursorPageItem�idN)�__name__�
__module__�__qualname__r�str�__annotations__�rr�</usr/local/lib/python3.10/dist-packages/openai/pagination.pyr
s
rc@�JeZdZUdZeeed<eed<edeefdd��Z	ed
dd	��Z
dS)r�LNote: no pagination actually occurs yet, this is for forwards-compatibility.�data�object�returncC�|j}|sgS|S�N�r ��selfr rrr�_get_page_items�zSyncPage._get_page_itemsNcC�dS�z�
        This page represents a response that isn't actually paginated at the API level
        so there will never be a next page.
        Nr�r'rrr�next_page_info�zSyncPage.next_page_info�r"N�rrr�__doc__rrrrr	r(r-rrrrr�
rc@r)rrr r!r"cCr#r$r%r&rrrr(.r)zAsyncPage._get_page_itemsNcCr*r+rr,rrrr-5r.zAsyncPage.next_page_infor/r0rrrrr(r2rc�peZdZUeeed<dZeeed<e	deefdd��Z
e	def�fdd��Ze	deefd	d
��Z
�ZS)rr N�has_morer"cCr#r$r%r&rrrr(Br)zSyncCursorPage._get_page_itemsc�$|j}|dur
|dur
dSt���S�NF�r4�super�
has_next_page�r'r4��	__class__rrr9I�
zSyncCursorPage.has_next_pagecC�D|j}|sdStt|d�}t|t�r|jdurdStd|jid�S�N����after)�params�r rr�
isinstancerrr
�r'r �itemrrrr-Q�zSyncCursorPage.next_page_info�rrrrrrr4r�boolr	r(r9r
r-�
__classcell__rrr;rr>�
rcr3)rr Nr4r"cCr#r$r%r&rrrr(cr)zAsyncCursorPage._get_page_itemscr5r6r7r:r;rrr9jr=zAsyncCursorPage.has_next_pagecCr>r?rCrErrrr-rrGzAsyncCursorPage.next_page_inforHrrr;rr_rKrN)�typingrrrrrr�typing_extensionsrr	r
�_base_clientrr
rr�__all__rrrrrrrrrr�<module>s    $!