
    	hMI                       d dl mZ d dlmZmZ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 ddl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" ddl#m$Z$m%Z% ddl&m'Z' ddl(m)Z) ddl*m+Z+ ddl,m-Z- ddgZ. G d de          Z/ G d de          Z0 G d d          Z1 G d d          Z2 G d d          Z3 G d d          Z4dS )    )annotations)DictIterableOptionalN   )_legacy_response   )Items
AsyncItemsItemsWithRawResponseAsyncItemsWithRawResponseItemsWithStreamingResponseAsyncItemsWithStreamingResponse)	NOT_GIVENBodyQueryHeadersNotGiven)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                      e Zd Zed d            Zed!d            Zed"d            Zeeddded	d#dZdddedd$dZ	dddedd%dZ
dddedd&dZdS )'r#   returnr
   c                *    t          | j                  S N)r
   _clientselfs    y/var/www/html/web-builder-api.evdpl.com/venv/lib/python3.11/site-packages/openai/resources/conversations/conversations.pyitemszConversations.items"   s    T\"""    ConversationsWithRawResponsec                     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/   r*   s    r,   with_raw_responsezConversations.with_raw_response&   s     ,D111r.   "ConversationsWithStreamingResponsec                     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
        )r3   r*   s    r,   with_streaming_responsez%Conversations.with_streaming_response0   s     2$777r.   Nr-   metadataextra_headersextra_query
extra_bodytimeoutr-   5Optional[Iterable[ResponseInputItemParam]] | NotGivenr8   Optional[Metadata] | NotGivenr9   Headers | Noner:   Query | Noner;   Body | Noner<   'float | httpx.Timeout | None | NotGivenr    c          
         |                      dt          ||dt          j                  t	          ||||          t
                    S )y  
        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. Useful for storing
              additional information about the object in a structured format.

          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r-   r8   r9   r:   r;   r<   bodyoptionscast_to)_postr   r   ConversationCreateParamsr   r    r+   r-   r8   r9   r:   r;   r<   s          r,   createzConversations.create9   sk    < zz " (  +C  )+Q[el   !  
 
 	
r.   rG   conversation_idstrc          	         |st          d|          |                     d| t          ||||          t                    S )Y  
        Get a conversation with the given ID.

        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/rG   rJ   rK   
ValueError_getr   r    r+   rP   r9   r:   r;   r<   s         r,   retrievezConversations.retrievef   sm    .  	sq^mqqrrryy/o//(+Q[el   !  
 
 	
r.   Dict[str, str]c          
         |st          d|          |                     d| t          d|it          j                  t          ||||          t                    S )  
        Update a conversation's metadata with the given ID.

        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
        rT   rU   r8   rG   rH   )rX   rL   r   r   ConversationUpdateParamsr   r    r+   rP   r8   r9   r:   r;   r<   s          r,   updatezConversations.update   s    <  	sq^mqqrrrzz/o// *h!79S9lmm(+Q[el   !  
 
 	
r.   r"   c          	         |st          d|          |                     d| t          ||||          t                    S )\  
        Delete a conversation with the given ID.

        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
        rT   rU   rG   rV   rX   _deleter   r"   rZ   s         r,   deletezConversations.delete   sm    .  	sq^mqqrrr||/o//(+Q[el   0  
 
 	
r.   )r&   r
   )r&   r/   )r&   r3   r-   r=   r8   r>   r9   r?   r:   r@   r;   rA   r<   rB   r&   r    rP   rQ   r9   r?   r:   r@   r;   rA   r<   rB   r&   r    rP   rQ   r8   r\   r9   r?   r:   r@   r;   rA   r<   rB   r&   r    rP   rQ   r9   r?   r:   r@   r;   rA   r<   rB   r&   r"   __name__
__module____qualname__r   r-   r2   r6   r   rO   r[   ra   rf    r.   r,   r#   r#   !   s/       # # # _# 2 2 2 _2 8 8 8 _8 HQ2; )-$("&;D+
 +
 +
 +
 +
 +
f )-$("&;D
 
 
 
 
 
P )-$("&;D'
 '
 '
 '
 '
 '
^ )-$("&;D
 
 
 
 
 
 
 
r.   c                      e Zd Zed d            Zed!d            Zed"d            Zeeddded	d#dZdddedd$dZ	dddedd%dZ
dddedd&dZdS )'r$   r&   r   c                *    t          | j                  S r(   )r   r)   r*   s    r,   r-   zAsyncConversations.items   s    $,'''r.   !AsyncConversationsWithRawResponsec                     t          |           S r1   )rr   r*   s    r,   r2   z$AsyncConversations.with_raw_response   s     1666r.   'AsyncConversationsWithStreamingResponsec                     t          |           S r5   )rt   r*   s    r,   r6   z*AsyncConversations.with_streaming_response   s     7t<<<r.   Nr7   r-   r=   r8   r>   r9   r?   r:   r@   r;   rA   r<   rB   r    c          
        K   |                      dt          ||dt          j                   d{V t	          ||||          t
                     d{V S )rD   rE   rF   NrG   rH   )rL   r   r   rM   r   r    rN   s          r,   rO   zAsyncConversations.create   s      < ZZ," (  +C        )+Q[el   !   
 
 
 
 
 
 
 
 	
r.   rG   rP   rQ   c          	        K   |st          d|          |                     d| t          ||||          t                     d{V S )rS   rT   rU   rG   rV   NrW   rZ   s         r,   r[   zAsyncConversations.retrieve  s      .  	sq^mqqrrrYY/o//(+Q[el   !  
 
 
 
 
 
 
 
 	
r.   r\   c          
        K   |st          d|          |                     d| t          d|it          j                   d{V t          ||||          t                     d{V S )r^   rT   rU   r8   NrG   rH   )rX   rL   r   r   r_   r   r    r`   s          r,   ra   zAsyncConversations.update8  s      <  	sq^mqqrrrZZ/o//,X&(B([        )+Q[el   !   	
 	
 	
 	
 	
 	
 	
 	
 		
r.   r"   c          	        K   |st          d|          |                     d| t          ||||          t                     d{V S )rc   rT   rU   rG   rV   Nrd   rZ   s         r,   rf   zAsyncConversations.deletec  s      .  	sq^mqqrrr\\/o//(+Q[el   0 " 
 
 
 
 
 
 
 
 	
r.   )r&   r   )r&   rr   )r&   rt   rg   rh   ri   rj   rk   ro   r.   r,   r$   r$      s/       ( ( ( _( 7 7 7 _7 = = = _= HQ2; )-$("&;D+
 +
 +
 +
 +
 +
f )-$("&;D
 
 
 
 
 
P )-$("&;D)
 )
 )
 )
 )
 )
b )-$("&;D
 
 
 
 
 
 
 
r.   c                  .    e Zd Zd	dZed
d            ZdS )r/   conversationsr#   r&   Nonec                   || _         t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        d S r(   )_conversationsr   to_raw_response_wrapperrO   r[   ra   rf   r+   r{   s     r,   __init__z%ConversationsWithRawResponse.__init__  s|    +&> 
 
 )@"
 
 '> 
 
 '> 
 
r.   r   c                4    t          | j        j                  S r(   )r   r~   r-   r*   s    r,   r-   z"ConversationsWithRawResponse.items  s    #D$7$=>>>r.   Nr{   r#   r&   r|   )r&   r   rl   rm   rn   r   r   r-   ro   r.   r,   r/   r/     sH        
 
 
 
  ? ? ? _? ? ?r.   r/   c                  .    e Zd Zd	dZed
d            ZdS )rr   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_wrapperrO   r[   ra   rf   r   s     r,   r   z*AsyncConversationsWithRawResponse.__init__  s|    +&D 
 
 )F"
 
 'D 
 
 'D 
 
r.   r   c                4    t          | j        j                  S r(   )r   r~   r-   r*   s    r,   r-   z'AsyncConversationsWithRawResponse.items  s    ()<)BCCCr.   Nr{   r$   r&   r|   )r&   r   r   ro   r.   r,   rr   rr     sN        
 
 
 
  D D D _D D Dr.   rr   c                  .    e Zd Zd	dZed
d            ZdS )r3   r{   r#   r&   r|   c                    || _         t          |j                  | _        t          |j                  | _        t          |j                  | _        t          |j                  | _        d S r(   )r~   r   rO   r[   ra   rf   r   s     r,   r   z+ConversationsWithStreamingResponse.__init__  sp    +2 
 
 5"
 
 3 
 
 3 
 
r.   r   c                4    t          | j        j                  S r(   )r   r~   r-   r*   s    r,   r-   z(ConversationsWithStreamingResponse.items  s    )$*=*CDDDr.   Nr   )r&   r   r   ro   r.   r,   r3   r3     sN        
 
 
 
  E E E _E E Er.   r3   c                  .    e Zd Zd	dZed
d            ZdS )rt   r{   r$   r&   r|   c                    || _         t          |j                  | _        t          |j                  | _        t          |j                  | _        t          |j                  | _        d S r(   )r~   r   rO   r[   ra   rf   r   s     r,   r   z0AsyncConversationsWithStreamingResponse.__init__  sp    +8 
 
 ;"
 
 9 
 
 9 
 
r.   r   c                4    t          | j        j                  S r(   )r   r~   r-   r*   s    r,   r-   z-AsyncConversationsWithStreamingResponse.items  s    .t/B/HIIIr.   Nr   )r&   r   r   ro   r.   r,   rt   rt     sN        
 
 
 
  J J J _J J Jr.   rt   )5
__future__r   typingr   r   r   httpx r   r-   r
   r   r   r   r   r   _typesr   r   r   r   r   _utilsr   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$   r/   rr   r3   rt   ro   r.   r,   <module>r      s   # " " " " " + + + + + + + + + +                             @ ? ? ? ? ? ? ? ? ? ? ? ? ? < < < < < < < < & & & & & & : : : : : : : : Y Y Y Y Y Y Y Y 0 0 0 0 0 0 Y Y Y Y Y Y Y Y 4 4 4 4 4 4 < < < < < < O O O O O O \ \ \ \ \ \0
1n
 n
 n
 n
 n
O n
 n
 n
bp
 p
 p
 p
 p
) p
 p
 p
f? ? ? ? ? ? ? ?,D D D D D D D D,E E E E E E E E,J J J J J J J J J Jr.   