
    _i]                       S SK Jr  S SKJrJrJrJr  S SKJr  S SK	r	SSK
Jr  SSKJrJrJrJrJrJrJr  SSKJrJr  SS	KJr  SS
KJrJr  SSKJrJr  SSKJ r J!r!  SSK"J#r#J$r$  SSK%J&r&J'r'J(r(  SSK)J*r*  SSK+J,r,  SSK-J.r.  SSK/J0r0  SSK1J2r2  SS/r3 " S S\5      r4 " S S\5      r5 " S S5      r6 " S S5      r7 " S S5      r8 " S S5      r9g)     )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            	      $   \ rS rSr\SS j5       r\SS j5       r\SSS\S.               SS jjr	\SSS\S.               SS jjr
\\\\SSS\S.                   SS	 jjrSSS\S
.             SS jjrSrg)r%      c                    [        U 5      $ z
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
)ItemsWithRawResponseselfs    `/var/www/html/land-ocr/venv/lib/python3.13/site-packages/openai/resources/conversations/items.pywith_raw_responseItems.with_raw_response   s     $D))    c                    [        U 5      $ 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
)ItemsWithStreamingResponser,   s    r.   with_streaming_responseItems.with_streaming_response'   s     *$//r1   Nincludeextra_headersextra_query
extra_bodytimeoutc                   U(       d  [        SU< 35      eU R                  SU S3[        SU0[        R                  5      [        UUUU[        SU0[        R                  5      S9[        S9$ )  
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//itemsitemsr8   r9   r:   r;   r<   querybodyoptionscast_to)
ValueError_postr   r   ItemCreateParamsr   r$   r-   conversation_idrB   r8   r9   r:   r;   r<   s           r.   createItems.create0   s    > ]^m]pqrrzzo.f5 '5!13E3V3VW(+'%%y'&:<N<_<_` )  
 	
r1   c                  U(       d  [        SU< 35      eU(       d  [        SU< 35      e[        [        U R                  SU SU 3[	        UUUU[        SU0[        R                  5      S9[        [        [        5      S95      $ )>  
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
r?   6Expected a non-empty value for `item_id` but received r@   /items/r8   rC   rG   rH   )	rI   r   r"   _getr   r   r   ItemRetrieveParamsr   r-   item_idrM   r8   r9   r:   r;   r<   s           r.   retrieveItems.retrieve^   s    : ]^m]pqrrUV]U`abbII!/!2''C,"/ +)#)9g*>@T@g@gh S"23  

 	
r1   afterr8   limitorderr9   r:   r;   r<   c                   U(       d  [        SU< 35      eU R                  SU S3[        [           [	        UUUU	[        UUUUS.[        R                  5      S9[        [        [        5      S9$ 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
r?   r@   rA   )r\   r8   r]   r^   rC   )pagerG   model)
rI   _get_api_listr   r"   r   r   r   ItemListParamsr   r   
r-   rM   r\   r8   r]   r^   r9   r:   r;   r<   s
             r.   list
Items.list   s    p ]^m]pqrr!!o.f5+,<=(+'%%!&#*!&!&	 %33 s,-% " 
 	
r1   r9   r:   r;   r<   c          
         U(       d  [        SU< 35      eU(       d  [        SU< 35      eU R                  SU SU 3[        X4XVS9[        S9$ )2  
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
r?   rR   r@   rS   rh   rT   rI   _deleter   r    r-   rX   rM   r9   r:   r;   r<   s          r.   deleteItems.delete   sn    0 ]^m]pqrrUV]U`abb||o.ggY?(+Q[ !  
 	
r1    )returnr+   )rq   r4   rM   strrB   z Iterable[ResponseInputItemParam]r8   List[ResponseIncludable] | Omitr9   Headers | Noner:   Query | Noner;   Body | Noner<   'float | httpx.Timeout | None | NotGivenrq   r$   rX   rs   rM   rs   r8   rt   r9   ru   r:   rv   r;   rw   r<   rx   rq   r"   )rM   rs   r\   
str | Omitr8   rt   r]   
int | Omitr^   Literal['asc', 'desc'] | Omitr9   ru   r:   rv   r;   rw   r<   rx   rq   z,SyncConversationCursorPage[ConversationItem]rX   rs   rM   rs   r9   ru   r:   rv   r;   rw   r<   rx   rq   r    __name__
__module____qualname____firstlineno__r   r/   r5   r   r   rN   rY   rf   rn   __static_attributes__rp   r1   r.   r%   r%      s   * * 0 0 48 )-$("&;D,
,
 0	,

 1,
 &,
 ",
  ,
 9,
 
,
f 48 )-$("&;D.
.
 	.

 1.
 &.
 ".
  .
 9.
 
.
h !37 /3 )-$("&;DM
M
 	M

 1M
 M
 -M
 &M
 "M
  M
 9M
 
6M
l )-$("&;D"
"
 	"
 &"
 ""
  "
 9"
 
"
 "
r1   c            	      $   \ rS rSr\SS j5       r\SS j5       r\SSS\S.               SS jjr	\SSS\S.               SS jjr
\\\\SSS\S.                   SS	 jjrSSS\S
.             SS jjrSrg)r&   i  c                    [        U 5      $ r*   )AsyncItemsWithRawResponser,   s    r.   r/   AsyncItems.with_raw_response  s     )..r1   c                    [        U 5      $ r3   )AsyncItemsWithStreamingResponser,   s    r.   r5   "AsyncItems.with_streaming_response  s     /t44r1   Nr7   c               $  #    U(       d  [        SU< 35      eU R                  SU S3[        SU0[        R                  5      I Sh  vN [        UUUU[        SU0[        R                  5      I Sh  vN S9[        S9I Sh  vN $  NA N N7f)	r>   r?   r@   rA   rB   Nr8   rC   rE   )rI   rJ   r   r   rK   r   r$   rL   s           r.   rN   AsyncItems.create  s     > ]^m]pqrrZZo.f5,gu-=?Q?b?bcc(+'%19g2FHZHkHkll )   
 
 	
c m
s6   ABB

	+B4B5BBBBBc               B  #    U(       d  [        SU< 35      eU(       d  [        SU< 35      e[        [        U R                  SU SU 3[	        UUUU[        SU0[        R                  5      I Sh  vN S9[        [        [        5      S9I Sh  vN 5      $  N' N
7f)	rQ   r?   rR   r@   rS   r8   NrC   rT   )	rI   r   r"   rU   r   r   r   rV   r   rW   s           r.   rY   AsyncItems.retrieveD  s     : ]^m]pqrrUV]U`abb))!/!2''C,"/ +)# 5y'6JL`LsLs tt S"23  
 

 	
 u
s$   A1B3B4BB
	BBr[   c                   U(       d  [        SU< 35      eU R                  SU S3[        [           [	        UUUU	[        UUUUS.[        R                  5      S9[        [        [        5      S9$ r`   )
rI   rc   r   r"   r   r   r   rd   r   r   re   s
             r.   rf   AsyncItems.listt  s    p ]^m]pqrr!!o.f5,-=>(+'%%!&#*!&!&	 %33 s,-% " 
 	
r1   rh   c          
        #    U(       d  [        SU< 35      eU(       d  [        SU< 35      eU R                  SU SU 3[        X4XVS9[        S9I Sh  vN $  N7f)rj   r?   rR   r@   rS   rh   rT   Nrk   rm   s          r.   rn   AsyncItems.delete  s{     0 ]^m]pqrrUV]U`abb\\o.ggY?(+Q[ ! " 
 
 	
 
s   AAAArp   )rq   r   )rq   r   rr   ry   )rM   rs   r\   rz   r8   rt   r]   r{   r^   r|   r9   ru   r:   rv   r;   rw   r<   rx   rq   zOAsyncPaginator[ConversationItem, AsyncConversationCursorPage[ConversationItem]]r}   r~   rp   r1   r.   r&   r&     s   / / 5 5 48 )-$("&;D,
,
 0	,

 1,
 &,
 ",
  ,
 9,
 
,
f 48 )-$("&;D.
.
 	.

 1.
 &.
 ".
  .
 9.
 
.
h !37 /3 )-$("&;DM
M
 	M

 1M
 M
 -M
 &M
 "M
  M
 9M
 
YM
l )-$("&;D"
"
 	"
 &"
 ""
  "
 9"
 
"
 "
r1   c                      \ rS rSrSS jrSrg)r+   i  c                8   Xl         [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR
                  5      U l        [        R                  " UR                  5      U l        g N)_itemsr
   to_raw_response_wrapperrN   rY   rf   rn   r-   rB   s     r.   __init__ItemsWithRawResponse.__init__  sq    &>>LL
 )@@NN
 %<<JJ
	 '>>LL
r1   r   rN   rn   rf   rY   NrB   r%   rq   Noner   r   r   r   r   r   rp   r1   r.   r+   r+         
r1   r+   c                      \ rS rSrSS jrSrg)r   i  c                8   Xl         [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR
                  5      U l        [        R                  " UR                  5      U l        g r   )r   r
   async_to_raw_response_wrapperrN   rY   rf   rn   r   s     r.   r   "AsyncItemsWithRawResponse.__init__  sq    &DDLL
 )FFNN
 %BBJJ
	 'DDLL
r1   r   NrB   r&   rq   r   r   rp   r1   r.   r   r     r   r1   r   c                      \ rS rSrSS jrSrg)r4   i  c                    Xl         [        UR                  5      U l        [        UR                  5      U l        [        UR                  5      U l        [        UR
                  5      U l        g r   )r   r   rN   rY   rf   rn   r   s     r.   r   #ItemsWithStreamingResponse.__init__  sY    2LL
 5NN
 1JJ
	 3LL
r1   r   Nr   r   rp   r1   r.   r4   r4     r   r1   r4   c                      \ rS rSrSS jrSrg)r   i  c                    Xl         [        UR                  5      U l        [        UR                  5      U l        [        UR                  5      U l        [        UR
                  5      U l        g r   )r   r   rN   rY   rf   rn   r   s     r.   r   (AsyncItemsWithStreamingResponse.__init__  sY    8LL
 ;NN
 7JJ
	 9LL
r1   r   Nr   r   rp   r1   r.   r   r     r   r1   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   r4   r   rp   r1   r.   <module>r      s    # , , %    K K K < & : Y Q @ ] ] < E E O NL
!c
O c
Lc
! c
L
 
$
 
$
 
$
 
r1   