Ë
    $Æ%hql  ã                  ó„  — d dl mZ d dl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 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,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«      Z4y)é    )Úannotations)ÚUnionÚIterableÚOptional)ÚLiteralNé   )Ú_legacy_response)Ú	NOT_GIVENÚBodyÚQueryÚHeadersÚNotGiven)Úmaybe_transformÚasync_maybe_transform)Úcached_property)ÚSyncAPIResourceÚAsyncAPIResource)Úto_streamed_response_wrapperÚ"async_to_streamed_response_wrapper)ÚSyncCursorPageÚAsyncCursorPage)ÚAsyncPaginatorÚmake_request_options)Úmessage_list_paramsÚmessage_create_paramsÚmessage_update_params)ÚMessage)ÚMetadata)ÚMessageDeleted)ÚMessageContentPartParamÚMessagesÚAsyncMessagesc            
      óF  — e Z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edddedœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd	„Z	eeeeeddded
œ		 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„Z
dddedœ	 	 	 	 	 	 	 	 	 	 	 	 	 dd„Zy)r!   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
        )ÚMessagesWithRawResponse©Úselfs    úd/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/openai/resources/beta/threads/messages.pyÚwith_raw_responsezMessages.with_raw_response   s   € ô ' tÓ,Ð,ó    c                ó   — 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
        )ÚMessagesWithStreamingResponser'   s    r)   Úwith_streaming_responsez Messages.with_streaming_response)   s   € ô -¨TÓ2Ð2r+   N©ÚattachmentsÚmetadataÚextra_headersÚextra_queryÚ
extra_bodyÚtimeoutc          
     óÄ   — |st        d|›�«      ‚ddi|xs i ¥}| j                  d|› d�t        ||||dœt        j                  «      t        ||||	¬«      t        ¬«      S )	á/  
        Create a message.

        Args:
          content: The text contents of the message.

          role:
              The role of the entity that is creating the message. Allowed values include:

              - `user`: Indicates the message is sent by an actual user and should be used in
                most cases to represent user-generated messages.
              - `assistant`: Indicates the message is generated by the assistant. Use this
                value to insert messages from the assistant into the conversation.

          attachments: A list of files attached to the message, and the tools they should be added to.

          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
        ú8Expected a non-empty value for `thread_id` but received úOpenAI-Betaúassistants=v2ú	/threads/ú	/messages©ÚcontentÚroler1   r2   ©r3   r4   r5   r6   ©ÚbodyÚoptionsÚcast_to)Ú
ValueErrorÚ_postr   r   ÚMessageCreateParamsr   r   ©
r(   Ú	thread_idr?   r@   r1   r2   r3   r4   r5   r6   s
             r)   ÚcreatezMessages.create2   s‘   € ñ\ ÜÐWÐXaÐWdÐeÓfÐfØ&¨ÐQ¸MÒ<OÈRÐQˆØ�z‰zØ˜	�{ )Ð,Ü à&Ø Ø#.Ø (ñ	ô &×9Ñ9óô )Ø+¸ÐQ[Ðelôô ð ó 
ð 	
r+   rA   c          	     ó¬   — |st        d|›�«      ‚|st        d|›�«      ‚ddi|xs i ¥}| j                  d|› d|› �t        ||||¬«      t        ¬«      S )	áG  
        Retrieve a message.

        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
        r9   ú9Expected a non-empty value for `message_id` but received r:   r;   r<   ú
/messages/rA   ©rD   rE   ©rF   Ú_getr   r   ©r(   Ú
message_idrJ   r3   r4   r5   r6   s          r)   ÚretrievezMessages.retrievet   s†   € ñ0 ÜÐWÐXaÐWdÐeÓfÐfÙÜÐXÐYcÐXfÐgÓhÐhØ&¨ÐQ¸MÒ<OÈRÐQˆØ�y‰yØ˜	�{ *¨Z¨LÐ9Ü(Ø+¸ÐQ[Ðelôô ð ó 
ð 	
r+   ©r2   r3   r4   r5   r6   c          
     óâ   — |st        d|›�«      ‚|st        d|›�«      ‚ddi|xs i ¥}| j                  d|› d|› �t        d|it        j                  «      t        ||||¬«      t        ¬	«      S )
áÙ  
        Modifies a message.

        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
        r9   rN   r:   r;   r<   rO   r2   rA   rB   )rF   rG   r   r   ÚMessageUpdateParamsr   r   ©r(   rT   rJ   r2   r3   r4   r5   r6   s           r)   ÚupdatezMessages.update™   s�   € ñ@ ÜÐWÐXaÐWdÐeÓfÐfÙÜÐXÐYcÐXfÐgÓhÐhØ&¨ÐQ¸MÒ<OÈRÐQˆØ�z‰zØ˜	�{ *¨Z¨LÐ9Ü  *¨hÐ!7Ô9N×9bÑ9bÓcÜ(Ø+¸ÐQ[Ðelôô ð ó 
ð 	
r+   ©	ÚafterÚbeforeÚlimitÚorderÚrun_idr3   r4   r5   r6   c       	        óÞ   — |st        d|›�«      ‚ddi|xs i ¥}| j                  d|› d�t        t           t	        |||	|
t        |||||dœt        j                  «      ¬«      t        ¬«      S ©	ah  
        Returns a list of messages for a given thread.

        Args:
          after: A cursor for use in pagination. `after` is an object ID that defines your place
              in the list. For instance, if you make a list request and receive 100 objects,
              ending with obj_foo, your subsequent call can include after=obj_foo in order to
              fetch the next page of the list.

          before: A cursor for use in pagination. `before` is an object ID that defines your place
              in the list. For instance, if you make a list request and receive 100 objects,
              starting with obj_foo, your subsequent call can include before=obj_foo in order
              to fetch the previous page of the list.

          limit: A limit on the number of objects to be returned. Limit can range between 1 and
              100, and the default is 20.

          order: Sort order by the `created_at` timestamp of the objects. `asc` for ascending
              order and `desc` for descending order.

          run_id: Filter messages by the run ID that generated them.

          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
        r9   r:   r;   r<   r=   )r]   r^   r_   r`   ra   )r3   r4   r5   r6   Úquery)ÚpagerD   Úmodel)rF   Ú_get_api_listr   r   r   r   r   ÚMessageListParams©r(   rJ   r]   r^   r_   r`   ra   r3   r4   r5   r6   s              r)   ÚlistzMessages.listÇ   s�   € ñ\ ÜÐWÐXaÐWdÐeÓfÐfØ&¨ÐQ¸MÒ<OÈRÐQˆØ×!Ñ!Ø˜	�{ )Ð,Ü¤Ñ(Ü(Ø+Ø'Ø%ØÜ%à!&Ø"(Ø!&Ø!&Ø"(ñô (×9Ñ9ó	ôô  ð' "ó 
ð 	
r+   c          	     ó¬   — |st        d|›�«      ‚|st        d|›�«      ‚ddi|xs i ¥}| j                  d|› d|› �t        ||||¬«      t        ¬«      S )	áF  
        Deletes a message.

        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
        r9   rN   r:   r;   r<   rO   rA   rP   ©rF   Ú_deleter   r   rS   s          r)   ÚdeletezMessages.delete  s†   € ñ0 ÜÐWÐXaÐWdÐeÓfÐfÙÜÐXÐYcÐXfÐgÓhÐhØ&¨ÐQ¸MÒ<OÈRÐQˆØ�|‰|Ø˜	�{ *¨Z¨LÐ9Ü(Ø+¸ÐQ[Ðelôô #ð ó 
ð 	
r+   )Úreturnr&   )rp   r.   ©rJ   Ústrr?   z-Union[str, Iterable[MessageContentPartParam]]r@   zLiteral['user', 'assistant']r1   z?Optional[Iterable[message_create_params.Attachment]] | NotGivenr2   úOptional[Metadata] | NotGivenr3   úHeaders | Noner4   úQuery | Noner5   úBody | Noner6   ú'float | httpx.Timeout | None | NotGivenrp   r   ©rT   rr   rJ   rr   r3   rt   r4   ru   r5   rv   r6   rw   rp   r   ©rT   rr   rJ   rr   r2   rs   r3   rt   r4   ru   r5   rv   r6   rw   rp   r   )rJ   rr   r]   ústr | NotGivenr^   rz   r_   úint | NotGivenr`   ú!Literal['asc', 'desc'] | NotGivenra   rz   r3   rt   r4   ru   r5   rv   r6   rw   rp   zSyncCursorPage[Message]©rT   rr   rJ   rr   r3   rt   r4   ru   r5   rv   r6   rw   rp   r   ©Ú__name__Ú
__module__Ú__qualname__r   r*   r/   r
   rK   rU   r[   rj   ro   © r+   r)   r!   r!      sg  „ Øò-ó ð-ð ò3ó ð3ð XaØ2;ð )-Ø$(Ø"&Ø;Dñ@
àð@
ð ?ð	@
ð
 +ð@
ð Uð@
ð 0ð@
ð &ð@
ð "ð@
ð  ð@
ð 9ð@
ð 
ó@
ðR )-Ø$(Ø"&Ø;Dñ#
àð#
ð ð	#
ð &ð#
ð "ð#
ð  ð#
ð 9ð#
ð 
ó#
ðT 3<ð )-Ø$(Ø"&Ø;Dñ,
àð,
ð ð	,
ð
 0ð,
ð &ð,
ð "ð,
ð  ð,
ð 9ð,
ð 
ó,
ðd !*Ø!*Ø )Ø3<Ø!*ð )-Ø$(Ø"&Ø;DñE
àðE
ð ð	E
ð
 ðE
ð ðE
ð 1ðE
ð ðE
ð &ðE
ð "ðE
ð  ðE
ð 9ðE
ð 
!óE
ð\ )-Ø$(Ø"&Ø;Dñ#
àð#
ð ð	#
ð &ð#
ð "ð#
ð  ð#
ð 9ð#
ð 
ô#
r+   c            
      óF  — e Z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edddedœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd	„Z	eeeeeddded
œ		 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„Z
dddedœ	 	 	 	 	 	 	 	 	 	 	 	 	 dd„Zy)r"   c                ó   — t        | «      S r%   )ÚAsyncMessagesWithRawResponser'   s    r)   r*   zAsyncMessages.with_raw_response5  s   € ô ,¨DÓ1Ð1r+   c                ó   — t        | «      S r-   )Ú"AsyncMessagesWithStreamingResponser'   s    r)   r/   z%AsyncMessages.with_streaming_response?  s   € ô 2°$Ó7Ð7r+   Nr0   c          
   ƒ  óô   K  — |st        d|›�«      ‚ddi|xs i ¥}| j                  d|› d�t        ||||dœt        j                  «      ƒ d{  –—† t        ||||	¬«      t        ¬	«      ƒ d{  –—† S 7 Œ$7 Œ­w)
r8   r9   r:   r;   r<   r=   r>   NrA   rB   )rF   rG   r   r   rH   r   r   rI   s
             r)   rK   zAsyncMessages.createH  sª   è ø€ ñ\ ÜÐWÐXaÐWdÐeÓfÐfØ&¨ÐQ¸MÒ<OÈRÐQˆØ—Z‘ZØ˜	�{ )Ð,Ü,à&Ø Ø#.Ø (ñ	ô &×9Ñ9ó÷ ô )Ø+¸ÐQ[Ðelôô ð  ó 
÷ 
ð 	
ðøð
ús$   ‚AA8ÁA4
ÁA8Á/A6Á0A8Á6A8rA   c          	   ƒ  óÈ   K  — |st        d|›�«      ‚|st        d|›�«      ‚ddi|xs i ¥}| j                  d|› d|› �t        ||||¬«      t        ¬«      ƒ d	{  –—† S 7 Œ­w)
rM   r9   rN   r:   r;   r<   rO   rA   rP   NrQ   rS   s          r)   rU   zAsyncMessages.retrieveŠ  s”   è ø€ ñ0 ÜÐWÐXaÐWdÐeÓfÐfÙÜÐXÐYcÐXfÐgÓhÐhØ&¨ÐQ¸MÒ<OÈRÐQˆØ—Y‘YØ˜	�{ *¨Z¨LÐ9Ü(Ø+¸ÐQ[Ðelôô ð ó 
÷ 
ð 	
ð 
úó   ‚AA"ÁA ÁA"rV   c          
   ƒ  ó  K  — |st        d|›�«      ‚|st        d|›�«      ‚ddi|xs i ¥}| j                  d|› d|› �t        d|it        j                  «      ƒ d{  –—† t        ||||¬	«      t        ¬
«      ƒ d{  –—† S 7 Œ$7 Œ­w)rX   r9   rN   r:   r;   r<   rO   r2   NrA   rB   )rF   rG   r   r   rY   r   r   rZ   s           r)   r[   zAsyncMessages.update¯  s²   è ø€ ñ@ ÜÐWÐXaÐWdÐeÓfÐfÙÜÐXÐYcÐXfÐgÓhÐhØ&¨ÐQ¸MÒ<OÈRÐQˆØ—Z‘ZØ˜	�{ *¨Z¨LÐ9Ü,¨j¸(Ð-CÔEZ×EnÑEnÓo×oÜ(Ø+¸ÐQ[Ðelôô ð  ó 
÷ 
ð 	
àoøð
ús$   ‚ABÁB
ÁBÁ>BÁ?BÂBr\   c       	        óÞ   — |st        d|›�«      ‚ddi|xs i ¥}| j                  d|› d�t        t           t	        |||	|
t        |||||dœt        j                  «      ¬«      t        ¬«      S rc   )rF   rg   r   r   r   r   r   rh   ri   s              r)   rj   zAsyncMessages.listÝ  s�   € ñ\ ÜÐWÐXaÐWdÐeÓfÐfØ&¨ÐQ¸MÒ<OÈRÐQˆØ×!Ñ!Ø˜	�{ )Ð,Ü ¤Ñ)Ü(Ø+Ø'Ø%ØÜ%à!&Ø"(Ø!&Ø!&Ø"(ñô (×9Ñ9ó	ôô  ð' "ó 
ð 	
r+   c          	   ƒ  óÈ   K  — |st        d|›�«      ‚|st        d|›�«      ‚ddi|xs i ¥}| j                  d|› d|› �t        ||||¬«      t        ¬«      ƒ d	{  –—† S 7 Œ­w)
rl   r9   rN   r:   r;   r<   rO   rA   rP   Nrm   rS   s          r)   ro   zAsyncMessages.delete$  s”   è ø€ ñ0 ÜÐWÐXaÐWdÐeÓfÐfÙÜÐXÐYcÐXfÐgÓhÐhØ&¨ÐQ¸MÒ<OÈRÐQˆØ—\‘\Ø˜	�{ *¨Z¨LÐ9Ü(Ø+¸ÐQ[Ðelôô #ð "ó 
÷ 
ð 	
ð 
úrŠ   )rp   r…   )rp   r‡   rq   rx   ry   )rJ   rr   r]   rz   r^   rz   r_   r{   r`   r|   ra   rz   r3   rt   r4   ru   r5   rv   r6   rw   rp   z1AsyncPaginator[Message, AsyncCursorPage[Message]]r}   r~   r‚   r+   r)   r"   r"   4  sg  „ Øò2ó ð2ð ò8ó ð8ð XaØ2;ð )-Ø$(Ø"&Ø;Dñ@
àð@
ð ?ð	@
ð
 +ð@
ð Uð@
ð 0ð@
ð &ð@
ð "ð@
ð  ð@
ð 9ð@
ð 
ó@
ðR )-Ø$(Ø"&Ø;Dñ#
àð#
ð ð	#
ð &ð#
ð "ð#
ð  ð#
ð 9ð#
ð 
ó#
ðT 3<ð )-Ø$(Ø"&Ø;Dñ,
àð,
ð ð	,
ð
 0ð,
ð &ð,
ð "ð,
ð  ð,
ð 9ð,
ð 
ó,
ðd !*Ø!*Ø )Ø3<Ø!*ð )-Ø$(Ø"&Ø;DñE
àðE
ð ð	E
ð
 ðE
ð ðE
ð 1ðE
ð ðE
ð &ðE
ð "ðE
ð  ðE
ð 9ðE
ð 
;óE
ð\ )-Ø$(Ø"&Ø;Dñ#
àð#
ð ð	#
ð &ð#
ð "ð#
ð  ð#
ð 9ð#
ð 
ô#
r+   c                  ó   — e Zd Zdd„Zy)r&   c                óz  — || _         t        j                  |j                  «      | _        t        j                  |j                  «      | _        t        j                  |j
                  «      | _        t        j                  |j                  «      | _        t        j                  |j                  «      | _        y ©N)Ú	_messagesr	   Úto_raw_response_wrapperrK   rU   r[   rj   ro   ©r(   Úmessagess     r)   Ú__init__z MessagesWithRawResponse.__init__K  s�   € Ø!ˆŒä&×>Ñ>Ø�O‰Oó
ˆŒô )×@Ñ@Ø×Ñó
ˆŒô '×>Ñ>Ø�O‰Oó
ˆŒô %×<Ñ<Ø�M‰Mó
ˆŒ	ô '×>Ñ>Ø�O‰Oó
ˆ�r+   N©r”   r!   rp   ÚNone©r   r€   r�   r•   r‚   r+   r)   r&   r&   J  ó   „ ô
r+   r&   c                  ó   — e Zd Zdd„Zy)r…   c                óz  — || _         t        j                  |j                  «      | _        t        j                  |j                  «      | _        t        j                  |j
                  «      | _        t        j                  |j                  «      | _        t        j                  |j                  «      | _        y r�   )r‘   r	   Úasync_to_raw_response_wrapperrK   rU   r[   rj   ro   r“   s     r)   r•   z%AsyncMessagesWithRawResponse.__init__`  s�   € Ø!ˆŒä&×DÑDØ�O‰Oó
ˆŒô )×FÑFØ×Ñó
ˆŒô '×DÑDØ�O‰Oó
ˆŒô %×BÑBØ�M‰Mó
ˆŒ	ô '×DÑDØ�O‰Oó
ˆ�r+   N©r”   r"   rp   r—   r˜   r‚   r+   r)   r…   r…   _  r™   r+   r…   c                  ó   — e Zd Zdd„Zy)r.   c                ó  — || _         t        |j                  «      | _        t        |j                  «      | _        t        |j                  «      | _        t        |j
                  «      | _        t        |j                  «      | _        y r�   )r‘   r   rK   rU   r[   rj   ro   r“   s     r)   r•   z&MessagesWithStreamingResponse.__init__u  sr   € Ø!ˆŒä2Ø�O‰Oó
ˆŒô 5Ø×Ñó
ˆŒô 3Ø�O‰Oó
ˆŒô 1Ø�M‰Mó
ˆŒ	ô 3Ø�O‰Oó
ˆ�r+   Nr–   r˜   r‚   r+   r)   r.   r.   t  r™   r+   r.   c                  ó   — e Zd Zdd„Zy)r‡   c                ó  — || _         t        |j                  «      | _        t        |j                  «      | _        t        |j                  «      | _        t        |j
                  «      | _        t        |j                  «      | _        y r�   )r‘   r   rK   rU   r[   rj   ro   r“   s     r)   r•   z+AsyncMessagesWithStreamingResponse.__init__Š  sr   € Ø!ˆŒä8Ø�O‰Oó
ˆŒô ;Ø×Ñó
ˆŒô 9Ø�O‰Oó
ˆŒô 7Ø�M‰Mó
ˆŒ	ô 9Ø�O‰Oó
ˆ�r+   Nr�   r˜   r‚   r+   r)   r‡   r‡   ‰  r™   r+   r‡   )5Ú
__future__r   Útypingr   r   r   Útyping_extensionsr   ÚhttpxÚ r	   Ú_typesr
   r   r   r   r   Ú_utilsr   r   Ú_compatr   Ú	_resourcer   r   Ú	_responser   r   Ú
paginationr   r   Ú_base_clientr   r   Útypes.beta.threadsr   r   r   Útypes.beta.threads.messager   Útypes.shared_params.metadatar   Ú"types.beta.threads.message_deletedr   Ú-types.beta.threads.message_content_part_paramr    Ú__all__r!   r"   r&   r…   r.   r‡   r‚   r+   r)   ú<module>r´      s™   ðõ #ç ,Ñ ,Ý %ã å !ß @Õ @ß =Ý 'ß ;ß Zß :÷÷ eÑ dÝ 2Ý 5Ý AÝ Uà�Ð
'€ôS
ˆô S
ôlS
Ð$ô S
÷l
ñ 
÷*
ñ 
÷*
ñ 
÷*
ò 
r+   