
    _jP                       S SK Jr  S SKJr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  SSKJrJrJrJrJrJrJr  SS	KJr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$  SSK%J&r&J'r'  SSK(J)r)  SSK*J+r+  SSK,J-r-  SSK.J/r/  SS/r0 " S S\5      r1 " S S\5      r2 " S S5      r3 " S S5      r4 " S S5      r5 " S S5      r6g)    )annotations)IterableOptionalN   )_legacy_response   )Items
AsyncItemsItemsWithRawResponseAsyncItemsWithRawResponseItemsWithStreamingResponseAsyncItemsWithStreamingResponse)BodyOmitQueryHeadersNotGivenomit	not_given)path_templatemaybe_transformasync_maybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)make_request_options)conversation_create_paramsconversation_update_params)Metadata)Conversation)ResponseInputItemParam)ConversationDeletedResourceConversationsAsyncConversationsc                     \ rS rSrSr\SS j5       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%   !   ,Manage conversations and conversation items.c                ,    [        U R                  5      $ r)   )r	   _clientselfs    a/home/rurouni/.local/lib/python3.13/site-packages/openai/resources/conversations/conversations.pyitemsConversations.items$   s     T\\""    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
)ConversationsWithRawResponser-   s    r/   with_raw_responseConversations.with_raw_response)   s     ,D11r2   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
)"ConversationsWithStreamingResponser-   s    r/   with_streaming_response%Conversations.with_streaming_response3   s     2$77r2   Nr0   metadataextra_headersextra_query
extra_bodytimeoutc               ~    U R                  S[        UUS.[        R                  5      [	        UUUUSS0S9[
        S9$ )  
Create a conversation.

Args:
  items: Initial items to include in the conversation context. You may add up to 20 items
      at a time.

  metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful
      for storing additional information about the object in a structured format, and
      querying for objects via API or the dashboard.

      Keys are strings with a maximum length of 64 characters. Values are strings with
      a maximum length of 512 characters.

  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
/conversationsr0   r>   bearer_authTr?   r@   rA   rB   securitybodyoptionscast_to)_postr   r   ConversationCreateParamsr   r"   r.   r0   r>   r?   r@   rA   rB   s          r/   createConversations.create<   s_    D zz " ( +CC )+'%'. !!  
 	
r2   r?   r@   rA   rB   c                   U(       d  [        SU< 35      eU R                  [        SUS9[        UUUUSS0S9[        S9$ )  
Get a conversation

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
>Expected a non-empty value for `conversation_id` but received  /conversations/{conversation_id}conversation_idrG   TrH   rL   rM   
ValueError_getr   r   r"   r.   rY   r?   r@   rA   rB   s         r/   retrieveConversations.retrieveq   s^    . ]^m]pqrryy<o^(+'%'. !  

 
	
r2   c                   U(       d  [        SU< 35      eU R                  [        SUS9[        SU0[        R
                  5      [        UUUUSS0S9[        S9$ )	{  
Update a conversation

Args:
  metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful
      for storing additional information about the object in a structured format, and
      querying for objects via API or the dashboard.

      Keys are strings with a maximum length of 64 characters. Values are strings with
      a maximum length of 512 characters.

  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
rV   rW   rX   r>   rG   TrH   rJ   )r\   rN   r   r   r    ConversationUpdateParamsr   r"   r.   rY   r>   r?   r@   rA   rB   s          r/   updateConversations.update   st    > ]^m]pqrrzz<o^ *h!79S9l9lm(+'%'. !  
 	
r2   c                   U(       d  [        SU< 35      eU R                  [        SUS9[        UUUUSS0S9[        S9$ )A  Delete a conversation.

Items in the conversation will not be deleted.

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
rV   rW   rX   rG   TrH   rZ   r\   _deleter   r   r$   r^   s         r/   deleteConversations.delete   s^    0 ]^m]pqrr||<o^(+'%'. 0  

 
	
r2    )returnr	   )rn   r5   )rn   r:   r0   z1Optional[Iterable[ResponseInputItemParam]] | Omitr>   zOptional[Metadata] | Omitr?   Headers | Noner@   Query | NonerA   Body | NonerB   'float | httpx.Timeout | None | NotGivenrn   r"   rY   strr?   rp   r@   rq   rA   rr   rB   rs   rn   r"   rY   ru   r>   zOptional[Metadata]r?   rp   r@   rq   rA   rr   rB   rs   rn   r"   rY   ru   r?   rp   r@   rq   rA   rr   rB   rs   rn   r$   __name__
__module____qualname____firstlineno____doc__r   r0   r6   r;   r   r   rQ   r_   re   rk   __static_attributes__rm   r2   r/   r%   r%   !   s   6# # 2 2 8 8 DH.2 )-$("&;D3
 A3
 ,	3
 &3
 "3
  3
 93
 
3
v )-$("&;D#
#
 &#
 "#
  #
 9#
 
#
X )-$("&;D,
,
 %	,
 &,
 ",
  ,
 9,
 
,
h )-$("&;D$
$
 &$
 "$
  $
 9$
 
%$
 $
r2   c                     \ rS rSrSr\SS j5       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&      r)   c                ,    [        U R                  5      $ r+   )r
   r,   r-   s    r/   r0   AsyncConversations.items   s     $,,''r2   c                    [        U 5      $ r4   )!AsyncConversationsWithRawResponser-   s    r/   r6   $AsyncConversations.with_raw_response   s     166r2   c                    [        U 5      $ r9   )'AsyncConversationsWithStreamingResponser-   s    r/   r;   *AsyncConversations.with_streaming_response   s     7t<<r2   Nr=   c                  #    U R                  S[        UUS.[        R                  5      I Sh  vN [	        UUUUSS0S9[
        S9I Sh  vN $  N! N7f)rD   rE   rF   NrG   TrH   rJ   )rN   r   r   rO   r   r"   rP   s          r/   rQ   AsyncConversations.create  sv     D ZZ," ( +CC  )+'%'. !!   
 
 	

s!   -AA
AAAArS   c                  #    U(       d  [        SU< 35      eU R                  [        SUS9[        UUUUSS0S9[        S9I Sh  vN $  N7f)	rU   rV   rW   rX   rG   TrH   rZ   Nr[   r^   s         r/   r_   AsyncConversations.retrieve;  sk     . ]^m]pqrrYY<o^(+'%'. !  

 

 
	
 

   AAAAc                  #    U(       d  [        SU< 35      eU R                  [        SUS9[        SU0[        R
                  5      I Sh  vN [        UUUUSS0S9[        S	9I Sh  vN $  N! N7f)
rb   rV   rW   rX   r>   NrG   TrH   rJ   )r\   rN   r   r   r    rc   r   r"   rd   s          r/   re   AsyncConversations.update`  s     > ]^m]pqrrZZ<o^,X&(B([([  )+'%'. !   
 
 	

s$   A
A2A.
A2)A0*A20A2c                  #    U(       d  [        SU< 35      eU R                  [        SUS9[        UUUUSS0S9[        S9I Sh  vN $  N7f)	rh   rV   rW   rX   rG   TrH   rZ   Nri   r^   s         r/   rk   AsyncConversations.delete  sk     0 ]^m]pqrr\\<o^(+'%'. 0 " 

 

 
	
 

r   rm   )rn   r
   )rn   r   )rn   r   ro   rt   rv   rw   rx   rm   r2   r/   r&   r&      s   6( ( 7 7 = = DH.2 )-$("&;D3
 A3
 ,	3
 &3
 "3
  3
 93
 
3
v )-$("&;D#
#
 &#
 "#
  #
 9#
 
#
X )-$("&;D.
.
 %	.
 &.
 ".
  .
 9.
 
.
l )-$("&;D$
$
 &$
 "$
  $
 9$
 
%$
 $
r2   c                  2    \ rS rSrSS jr\SS j5       rSrg)r5   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)_conversationsr   to_raw_response_wrapperrQ   r_   re   rk   r.   conversationss     r/   __init__%ConversationsWithRawResponse.__init__  sz    +&>>  
 )@@""
 '>>  
 '>>  
r2   c                @    [        U R                  R                  5      $ r+   )r   r   r0   r-   s    r/   r0   "ConversationsWithRawResponse.items  s     $D$7$7$=$=>>r2   r   rQ   rk   r_   re   Nr   r%   rn   None)rn   r   ry   rz   r{   r|   r   r   r0   r~   rm   r2   r/   r5   r5     s    
  ? ?r2   r5   c                  2    \ rS rSrSS jr\SS j5       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_wrapperrQ   r_   re   rk   r   s     r/   r   *AsyncConversationsWithRawResponse.__init__  sz    +&DD  
 )FF""
 'DD  
 'DD  
r2   c                @    [        U R                  R                  5      $ r+   )r   r   r0   r-   s    r/   r0   'AsyncConversationsWithRawResponse.items  s     ))<)<)B)BCCr2   r   Nr   r&   rn   r   )rn   r   r   rm   r2   r/   r   r     s    
  D Dr2   r   c                  2    \ rS rSrSS jr\SS j5       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   rQ   r_   re   rk   r   s     r/   r   +ConversationsWithStreamingResponse.__init__  sb    +2  
 5""
 3  
 3  
r2   c                @    [        U R                  R                  5      $ r+   )r   r   r0   r-   s    r/   r0   (ConversationsWithStreamingResponse.items  s     *$*=*=*C*CDDr2   r   Nr   )rn   r   r   rm   r2   r/   r:   r:     s    
  E Er2   r:   c                  2    \ rS rSrSS jr\SS j5       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   rQ   r_   re   rk   r   s     r/   r   0AsyncConversationsWithStreamingResponse.__init__  sb    +8  
 ;""
 9  
 9  
r2   c                @    [        U R                  R                  5      $ r+   )r   r   r0   r-   s    r/   r0   -AsyncConversationsWithStreamingResponse.items  s     /t/B/B/H/HIIr2   r   Nr   )rn   r   r   rm   r2   r/   r   r     s    
  J Jr2   r   )7
__future__r   typingr   r   httpx r   r0   r	   r
   r   r   r   r   _typesr   r   r   r   r   r   r   _utilsr   r   r   _compatr   	_resourcer   r   	_responser   r   _base_clientr   types.conversationsr   r    types.shared_params.metadatar!    types.conversations.conversationr"   )types.responses.response_input_item_paramr#   1types.conversations.conversation_deleted_resourcer$   __all__r%   r&   r5   r   r:   r   rm   r2   r/   <module>r      s    # %     L K K K K & : Y 0 Y 4 < O \0
1G
O G
TI
) I
X? ?.D D.E E.J Jr2   