
    -2i]                       d dl mZ d dlmZ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&m'Z'm(Z( ddl)m*Z* ddl+m,Z, ddl-m.Z. ddl/m0Z0 ddl1m2Z2 ddgZ3 G d de          Z4 G d de          Z5 G d d          Z6 G d d          Z7 G d d          Z8 G d d          Z9dS )     )annotations)AnyListIterablecast)LiteralN   )_legacy_response)BodyOmitQueryHeadersNotGivenomit	not_given)maybe_transformasync_maybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)SyncConversationCursorPageAsyncConversationCursorPage)AsyncPaginatormake_request_options)item_list_paramsitem_create_paramsitem_retrieve_params)Conversation)ResponseIncludable)ConversationItem)ResponseInputItemParam)ConversationItemListItems
AsyncItemsc            	          e Zd Zed'd            Zed(d            Zedddedd)dZedddedd*dZ	eeeedddedd+d#Z
ddded$d,d&ZdS )-r%   returnItemsWithRawResponsec                     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)   selfs    c/var/www/html/pixcura-vrs/venv/lib/python3.11/site-packages/openai/resources/conversations/items.pywith_raw_responsezItems.with_raw_response   s     $D)))    ItemsWithStreamingResponsec                     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
        )r1   r,   s    r.   with_streaming_responsezItems.with_streaming_response'   s     *$///r0   Nincludeextra_headersextra_query
extra_bodytimeoutconversation_idstritems Iterable[ResponseInputItemParam]r6   List[ResponseIncludable] | Omitr7   Headers | Noner8   Query | Noner9   Body | Noner:   'float | httpx.Timeout | None | NotGivenr$   c                   |st          d|          |                     d| dt          d|it          j                  t          ||||t          d|it          j                            t                    S )  
        Create items in a conversation with the given ID.

        Args:
          items: The items to add to the conversation. You may add up to 20 items at a time.

          include: Additional fields to include in the response. See the `include` parameter for
              [listing Conversation items above](https://platform.openai.com/docs/api-reference/conversations/list-items#conversations_list_items-include)
              for more information.

          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
        >Expected a non-empty value for `conversation_id` but received /conversations//itemsr=   r6   r7   r8   r9   r:   querybodyoptionscast_to)
ValueError_postr   r   ItemCreateParamsr   r$   r-   r;   r=   r6   r7   r8   r9   r:   s           r.   createzItems.create0   s    >  	sq^mqqrrrzz5o555 '5!13E3VWW(+'%%y'&:<N<_``   )  
 
 	
r0   item_idr"   c               <   |st          d|          |st          d|          t          t          |                     d| d| t	          ||||t          d|it          j                            t          t          t                                        S )  
        Get a single item from a conversation with the given IDs.

        Args:
          include: Additional fields to include in the response. See the `include` parameter for
              [listing Conversation items above](https://platform.openai.com/docs/api-reference/conversations/list-items#conversations_list_items-include)
              for more information.

          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
        rF   6Expected a non-empty value for `item_id` but received rG   /items/r6   rI   rM   rN   )	rO   r   r"   _getr   r   r   ItemRetrieveParamsr   r-   rT   r;   r6   r7   r8   r9   r:   s           r.   retrievezItems.retrieve^   s    :  	sq^mqqrrr 	caV]aabbbIIC/CC'CC,"/ +)#)9g*>@T@ghh   S"233  
 

 
 	
r0   afterr6   limitorderr7   r8   r9   r:   r_   
str | Omitr`   
int | Omitra   Literal['asc', 'desc'] | Omit,SyncConversationCursorPage[ConversationItem]c                  |st          d|          |                     d| dt          t                   t	          ||||	t          ||||dt          j                            t          t          t                              S a  
        List all items for a conversation with the given ID.

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

          include: Specify additional output data to include in the model response. Currently
              supported values are:

              - `web_search_call.action.sources`: Include the sources of the web search tool
                call.
              - `code_interpreter_call.outputs`: Includes the outputs of python code execution
                in code interpreter tool call items.
              - `computer_call_output.output.image_url`: Include image urls from the computer
                call output.
              - `file_search_call.results`: Include the search results of the file search tool
                call.
              - `message.input_image.image_url`: Include image urls from the input message.
              - `message.output_text.logprobs`: Include logprobs with assistant messages.
              - `reasoning.encrypted_content`: Includes an encrypted version of reasoning
                tokens in reasoning item outputs. This enables reasoning items to be used in
                multi-turn conversations when using the Responses API statelessly (like when
                the `store` parameter is set to `false`, or when an organization is enrolled
                in the zero data retention program).

          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
        rF   rG   rH   )r_   r6   r`   ra   rI   )pagerM   model)
rO   _get_api_listr   r"   r   r   r   ItemListParamsr   r   
r-   r;   r_   r6   r`   ra   r7   r8   r9   r:   s
             r.   listz
Items.list   s    p  	sq^mqqrrr!!5o555+,<=(+'%%!&#*!&!&	  %3    s,--% " 
 
 	
r0   r7   r8   r9   r:   r    c          	         |st          d|          |st          d|          |                     d| d| t          ||||          t                    S )j  
        Delete an item from a conversation with the given IDs.

        Args:
          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
        rF   rW   rG   rX   rn   rY   rO   _deleter   r    r-   rT   r;   r7   r8   r9   r:   s          r.   deletezItems.delete   s    0  	sq^mqqrrr 	caV]aabbb||?o??g??(+Q[el   !  
 
 	
r0   )r(   r)   )r(   r1   r;   r<   r=   r>   r6   r?   r7   r@   r8   rA   r9   rB   r:   rC   r(   r$   rT   r<   r;   r<   r6   r?   r7   r@   r8   rA   r9   rB   r:   rC   r(   r"   )r;   r<   r_   rb   r6   r?   r`   rc   ra   rd   r7   r@   r8   rA   r9   rB   r:   rC   r(   re   rT   r<   r;   r<   r7   r@   r8   rA   r9   rB   r:   rC   r(   r    __name__
__module____qualname__r   r/   r4   r   r   rS   r]   rm   rt    r0   r.   r%   r%      s#       * * * _* 0 0 0 _0 48 )-$("&;D,
 ,
 ,
 ,
 ,
 ,
f 48 )-$("&;D.
 .
 .
 .
 .
 .
h !37 /3 )-$("&;DM
 M
 M
 M
 M
 M
l )-$("&;D"
 "
 "
 "
 "
 "
 "
 "
r0   c            	          e Zd Zed'd            Zed(d            Zedddedd)dZedddedd*dZ	eeeedddedd+d#Z
ddded$d,d&ZdS )-r&   r(   AsyncItemsWithRawResponsec                     t          |           S r+   )r~   r,   s    r.   r/   zAsyncItems.with_raw_response  s     )...r0   AsyncItemsWithStreamingResponsec                     t          |           S r3   )r   r,   s    r.   r4   z"AsyncItems.with_streaming_response  s     /t444r0   Nr5   r;   r<   r=   r>   r6   r?   r7   r@   r8   rA   r9   rB   r:   rC   r$   c               "  K   |st          d|          |                     d| dt          d|it          j                   d{V t          ||||t          d|it          j                   d{V           t                     d{V S )	rE   rF   rG   rH   r=   Nr6   rI   rK   )rO   rP   r   r   rQ   r   r$   rR   s           r.   rS   zAsyncItems.create  s      >  	sq^mqqrrrZZ5o555,gu-=?Q?bcccccccc(+'%19g2FHZHkllllllll   )   
 
 
 
 
 
 
 
 	
r0   rT   r"   c               X  K   |st          d|          |st          d|          t          t          |                     d| d| t	          ||||t          d|it          j                   d{V           t          t          t                               d{V           S )	rV   rF   rW   rG   rX   r6   NrI   rY   )	rO   r   r"   rZ   r   r   r   r[   r   r\   s           r.   r]   zAsyncItems.retrieveD  s      :  	sq^mqqrrr 	caV]aabbb))C/CC'CC,"/ +)# 5y'6JL`Ls t ttttttt   S"233  
 
 
 
 
 
 
 

 
 	
r0   r^   r_   rb   r`   rc   ra   rd   OAsyncPaginator[ConversationItem, AsyncConversationCursorPage[ConversationItem]]c                  |st          d|          |                     d| dt          t                   t	          ||||	t          ||||dt          j                            t          t          t                              S rg   )
rO   rj   r   r"   r   r   r   rk   r   r   rl   s
             r.   rm   zAsyncItems.listt  s    p  	sq^mqqrrr!!5o555,-=>(+'%%!&#*!&!&	  %3    s,--% " 
 
 	
r0   rn   r    c          	        K   |st          d|          |st          d|          |                     d| d| t          ||||          t                     d{V S )rp   rF   rW   rG   rX   rn   rY   Nrq   rs   s          r.   rt   zAsyncItems.delete  s      0  	sq^mqqrrr 	caV]aabbb\\?o??g??(+Q[el   ! " 
 
 
 
 
 
 
 
 	
r0   )r(   r~   )r(   r   ru   rv   )r;   r<   r_   rb   r6   r?   r`   rc   ra   rd   r7   r@   r8   rA   r9   rB   r:   rC   r(   r   rw   rx   r|   r0   r.   r&   r&     s#       / / / _/ 5 5 5 _5 48 )-$("&;D,
 ,
 ,
 ,
 ,
 ,
f 48 )-$("&;D.
 .
 .
 .
 .
 .
h !37 /3 )-$("&;DM
 M
 M
 M
 M
 M
l )-$("&;D"
 "
 "
 "
 "
 "
 "
 "
r0   c                      e Zd ZddZdS )r)   r=   r%   r(   Nonec                   || _         t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        d S N)_itemsr
   to_raw_response_wrapperrS   r]   rm   rt   r-   r=   s     r.   __init__zItemsWithRawResponse.__init__  sw    &>L
 
 )@N
 
 %<J
 
	 '>L
 
r0   Nr=   r%   r(   r   ry   rz   r{   r   r|   r0   r.   r)   r)     (        
 
 
 
 
 
r0   r)   c                      e Zd ZddZdS )r~   r=   r&   r(   r   c                   || _         t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        d S r   )r   r
   async_to_raw_response_wrapperrS   r]   rm   rt   r   s     r.   r   z"AsyncItemsWithRawResponse.__init__  sw    &DL
 
 )FN
 
 %BJ
 
	 'DL
 
r0   Nr=   r&   r(   r   r   r|   r0   r.   r~   r~     r   r0   r~   c                      e Zd ZddZdS )r1   r=   r%   r(   r   c                    || _         t          |j                  | _        t          |j                  | _        t          |j                  | _        t          |j                  | _        d S r   )r   r   rS   r]   rm   rt   r   s     r.   r   z#ItemsWithStreamingResponse.__init__  sk    2L
 
 5N
 
 1J
 
	 3L
 
r0   Nr   r   r|   r0   r.   r1   r1     r   r0   r1   c                      e Zd ZddZdS )r   r=   r&   r(   r   c                    || _         t          |j                  | _        t          |j                  | _        t          |j                  | _        t          |j                  | _        d S r   )r   r   rS   r]   rm   rt   r   s     r.   r   z(AsyncItemsWithStreamingResponse.__init__  sk    8L
 
 ;N
 
 7J
 
	 9L
 
r0   Nr   r   r|   r0   r.   r   r     r   r0   r   ):
__future__r   typingr   r   r   r   typing_extensionsr   httpx r
   _typesr   r   r   r   r   r   r   _utilsr   r   _compatr   	_resourcer   r   	_responser   r   
paginationr   r   _base_clientr   r   types.conversationsr   r   r    types.conversations.conversationr    #types.responses.response_includabler!   %types.conversations.conversation_itemr"   )types.responses.response_input_item_paramr#   *types.conversations.conversation_item_listr$   __all__r%   r&   r)   r~   r1   r   r|   r0   r.   <module>r      s   # " " " " " , , , , , , , , , , , , % % % % % %              K K K K K K K K K K K K K K K K K K < < < < < < < < & & & & & & : : : : : : : : Y Y Y Y Y Y Y Y Q Q Q Q Q Q Q Q @ @ @ @ @ @ @ @ ] ] ] ] ] ] ] ] ] ] < < < < < < E E E E E E E E E E E E O O O O O O N N N N N NL
!c
 c
 c
 c
 c
O c
 c
 c
Lc
 c
 c
 c
 c
! c
 c
 c
L
 
 
 
 
 
 
 
$
 
 
 
 
 
 
 
$
 
 
 
 
 
 
 
$
 
 
 
 
 
 
 
 
 
r0   