o
    ùT·jè!  ã                   @  s8  d dl mZ d dl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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Ú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)Úitem_list_params)ÚAgentSessionItemÚItemsÚ
AsyncItemsc                   @  óD   e Zd Zeddd„ƒZeddd„ƒZeeeddded	œddd„ZdS ) r   ÚreturnÚItemsWithRawResponsec                 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%   ún/home/dinkstrade/pdmp-scanner/venv/lib/python3.10/site-packages/openai/resources/beta/agents/sessions/items.pyÚwith_raw_response   ó   zItems.with_raw_responseÚItemsWithStreamingResponsec                 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Items.with_streaming_responseN©ÚafterÚlimitÚorderÚextra_headersÚextra_queryÚ
extra_bodyÚtimeoutÚ
session_idÚstrr.   ú
str | Omitr/   ú
int | Omitr0   úLiteral['asc', 'desc'] | Omitr1   úHeaders | Noner2   úQuery | Noner3   úBody | Noner4   ú(float | httpx2.Timeout | None | NotGivenú SyncCursorPage[AgentSessionItem]c          	      C  ój   |s	t d|›�ƒ‚ddi|pi ¥}| jtd|d�tt t||||t|||dœtjƒddid	�t	t
tƒd
�S ©a°  
        Lists items produced by the session's root agent, including its interactions
        with subagents. Each subagent has its own item history. See
        [inspecting agent output](https://developers.openai.com/api/docs/guides/agents-api/observability).

        Args:
          after: Return resources after this resource ID in the selected order.

          limit: The maximum number of resources to return, between 1 and 100. Defaults to 20.

          order: The order in which resources are returned. Defaults to `desc`.

              - `asc` - Returns resources in ascending order.
              - `desc` - Returns resources 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
        z9Expected a non-empty value for `session_id` but received zOpenAI-Betaz	agents=v1z#/agents/sessions/{session_id}/items)r5   )r.   r/   r0   Úbearer_authT)r1   r2   r3   r4   ÚqueryÚsecurity)ÚpageÚoptionsÚmodel)Ú
ValueErrorÚ_get_api_listr   r   r   r   r   r   ÚItemListParamsr   r   ©	r$   r5   r.   r/   r0   r1   r2   r3   r4   r%   r%   r&   Úlist,   ó,   %
ýúóîz
Items.list)r   r    )r   r)   )r5   r6   r.   r7   r/   r8   r0   r9   r1   r:   r2   r;   r3   r<   r4   r=   r   r>   ©	Ú__name__Ú
__module__Ú__qualname__r   r'   r+   r   r   rK   r%   r%   r%   r&   r      ó    	ôc                   @  r   ) r   r   ÚAsyncItemsWithRawResponsec                 C  r!   r"   )rR   r#   r%   r%   r&   r'   k   r(   zAsyncItems.with_raw_responseÚAsyncItemsWithStreamingResponsec                 C  r!   r*   )rS   r#   r%   r%   r&   r+   u   r,   z"AsyncItems.with_streaming_responseNr-   r5   r6   r.   r7   r/   r8   r0   r9   r1   r:   r2   r;   r3   r<   r4   r=   úCAsyncPaginator[AgentSessionItem, AsyncCursorPage[AgentSessionItem]]c          	      C  r?   r@   )rG   rH   r   r   r   r   r   r   rI   r   r   rJ   r%   r%   r&   rK   ~   rL   zAsyncItems.list)r   rR   )r   rS   )r5   r6   r.   r7   r/   r8   r0   r9   r1   r:   r2   r;   r3   r<   r4   r=   r   rT   rM   r%   r%   r%   r&   r   j   rQ   c                   @  ó   e Zd Zddd„ZdS )	r    Úitemsr   r   ÚNonec                 C  ó   || _ t |j¡| _d S ©N)Ú_itemsr   Úto_raw_response_wrapperrK   ©r$   rV   r%   r%   r&   Ú__init__½   ó   
ÿzItemsWithRawResponse.__init__N©rV   r   r   rW   ©rN   rO   rP   r]   r%   r%   r%   r&   r    ¼   ó    r    c                   @  rU   )	rR   rV   r   r   rW   c                 C  rX   rY   )rZ   r   Úasync_to_raw_response_wrapperrK   r\   r%   r%   r&   r]   Æ   r^   z"AsyncItemsWithRawResponse.__init__N©rV   r   r   rW   r`   r%   r%   r%   r&   rR   Å   ra   rR   c                   @  rU   )	r)   rV   r   r   rW   c                 C  ó   || _ t|jƒ| _d S rY   )rZ   r   rK   r\   r%   r%   r&   r]   Ï   ó   
ÿz#ItemsWithStreamingResponse.__init__Nr_   r`   r%   r%   r%   r&   r)   Î   ra   r)   c                   @  rU   )	rS   rV   r   r   rW   c                 C  rd   rY   )rZ   r   rK   r\   r%   r%   r&   r]   Ø   re   z(AsyncItemsWithStreamingResponse.__init__Nrc   r`   r%   r%   r%   r&   rS   ×   ra   rS   ).Ú
__future__r   Útypingr   r   Útyping_extensionsr   Úhttpx2Ú r   Ú_typesr   r	   r
   r   r   r   r   Ú_utilsr   r   Ú_compatr   Ú	_resourcer   r   Ú	_responser   r   Ú
paginationr   r   Ú_base_clientr   r   Útypes.beta.agents.sessionsr   Útypes.beta.agent_session_itemr   Ú__all__r   r   r    rR   r)   rS   r%   r%   r%   r&   Ú<module>   s*   $RR			