ó
    ûÞ j&~  ã                  ó˜  • S SK Jr  S SKrS SK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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/r1 " S S\5      r2 " S S\5      r3 " S S5      r4 " S S5      r5 " S S5      r6 " S S5      r7g)é    )ÚannotationsN)ÚUnionÚIterableÚOptional)ÚLiteralé   )Ú_legacy_response)Ú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)ÚSyncCursorPageÚAsyncCursorPage)ÚAsyncPaginatorÚmake_request_options)Úmessage_list_paramsÚmessage_create_paramsÚmessage_update_params)ÚMessage)ÚMetadata)ÚMessageDeleted)ÚMessageContentPartParamÚMessagesÚAsyncMessagesc                  ó<  • \ rS rSrSr\SS j5       r\SS j5       r\R                  " S5      \
\
SSS\S.                   SS jj5       r\R                  " S5      SSS\S	.             SS
 jj5       r\R                  " S5      \
SSS\S.               SS jj5       r\R                  " S5      \
\
\
\
\
SSS\S.	                     SS jj5       r\R                  " S5      SSS\S	.             SS jj5       rSrg)r$   é   ú4Build Assistants that can call models and use tools.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
)ÚMessagesWithRawResponse©Úselfs    Ú`/var/www/html/gaurav/venv/lib/python3.13/site-packages/openai/resources/beta/threads/messages.pyÚwith_raw_responseÚMessages.with_raw_response   s   € ô ' tÓ,Ð,ó    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
)ÚMessagesWithStreamingResponser,   s    r.   Úwith_streaming_responseÚ Messages.with_streaming_response)   s   € ô -¨TÓ2Ð2r1   ú>The Assistants API is deprecated in favor of the Responses APIN©ÚattachmentsÚmetadataÚextra_headersÚextra_queryÚ
extra_bodyÚtimeoutc               óÜ   • U(       d  [        SU< 35      eSS0U=(       d    0 EnU R                  [        SUS9[        UUUUS.[        R
                  5      [        UUUU	SS0S	9[        S
9$ )á�  
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/{thread_id}/messages©Ú	thread_id©ÚcontentÚroler9   r:   Úbearer_authT©r;   r<   r=   r>   Úsecurity©ÚbodyÚoptionsÚcast_to)Ú
ValueErrorÚ_postr   r   r   ÚMessageCreateParamsr   r    ©
r-   rF   rH   rI   r9   r:   r;   r<   r=   r>   s
             r.   ÚcreateÚMessages.create2   s™   € ö^ ÜÐWÐXaÑWdÐeÓfÐfØ&¨ÐQ¸M×<OÈRÐQˆØ�z‰zÜÐ9ÀYÑOÜ à&Ø Ø#.Ø (ñ	ô &×9Ñ9óô )Ø+Ø'Ø%ØØ'¨Ð.ñô ð% ð 
ð 	
r1   ©r;   r<   r=   r>   c               óÌ   • U(       d  [        SU< 35      eU(       d  [        SU< 35      eSS0U=(       d    0 EnU R                  [        SX!S9[        UUUUSS0S	9[        S
9$ )á  
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
rA   ú9Expected a non-empty value for `message_id` but received rB   rC   ú*/threads/{thread_id}/messages/{message_id}©rF   Ú
message_idrJ   TrK   ©rO   rP   ©rQ   Ú_getr   r   r    ©r-   r]   rF   r;   r<   r=   r>   s          r.   ÚretrieveÚMessages.retrievey   s‹   € ö2 ÜÐWÐXaÑWdÐeÓfÐfÞÜÐXÐYcÑXfÐgÓhÐhØ&¨ÐQ¸M×<OÈRÐQˆØ�y‰yÜÐFÐR[ÑsÜ(Ø+Ø'Ø%ØØ'¨Ð.ñô ð ð 

ð 
	
r1   ©r:   r;   r<   r=   r>   c               ó  • U(       d  [        SU< 35      eU(       d  [        SU< 35      eSS0U=(       d    0 EnU R                  [        SX!S9[        SU0[        R
                  5      [        UUUUSS	0S
9[        S9$ )áy  
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
rA   rZ   rB   rC   r[   r\   r:   rJ   TrK   rM   )rQ   rR   r   r   r   ÚMessageUpdateParamsr   r    ©r-   r]   rF   r:   r;   r<   r=   r>   s           r.   ÚupdateÚMessages.update£   s¢   € öB ÜÐWÐXaÑWdÐeÓfÐfÞÜÐXÐYcÑXfÐgÓhÐhØ&¨ÐQ¸M×<OÈRÐQˆØ�z‰zÜÐFÐR[ÑsÜ  *¨hÐ!7Ô9N×9bÑ9bÓcÜ(Ø+Ø'Ø%ØØ'¨Ð.ñô ð ð 
ð 	
r1   ©	ÚafterÚbeforeÚlimitÚorderÚrun_idr;   r<   r=   r>   c       	        óö   • U(       d  [        SU< 35      eSS0U=(       d    0 EnU R                  [        SUS9[        [           [        UUU	U
[        UUUUUS.[        R                  5      SS0S	9[        S
9$ ©aÈ  
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
rA   rB   rC   rD   rE   )rl   rm   rn   ro   rp   rJ   T)r;   r<   r=   r>   ÚqueryrL   )ÚpagerO   Úmodel)	rQ   Ú_get_api_listr   r   r    r   r   r   ÚMessageListParams©r-   rF   rl   rm   rn   ro   rp   r;   r<   r=   r>   s              r.   ÚlistÚMessages.listÖ   s¦   € ö^ ÜÐWÐXaÑWdÐeÓfÐfØ&¨ÐQ¸M×<OÈRÐQˆØ×!Ñ!ÜÐ9ÀYÑOÜ¤Ñ(Ü(Ø+Ø'Ø%ØÜ%à!&Ø"(Ø!&Ø!&Ø"(ñô (×9Ñ9ó	ð (¨Ð.ñô" ð) "ð 
ð 	
r1   c               óÌ   • U(       d  [        SU< 35      eU(       d  [        SU< 35      eSS0U=(       d    0 EnU R                  [        SX!S9[        UUUUSS0S	9[        S
9$ )á  
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
rA   rZ   rB   rC   r[   r\   rJ   TrK   r^   ©rQ   Ú_deleter   r   r"   ra   s          r.   ÚdeleteÚMessages.delete  s‹   € ö2 ÜÐWÐXaÑWdÐeÓfÐfÞÜÐXÐYcÑXfÐgÓhÐhØ&¨ÐQ¸M×<OÈRÐQˆØ�|‰|ÜÐFÐR[ÑsÜ(Ø+Ø'Ø%ØØ'¨Ð.ñô #ð ð 

ð 
	
r1   © )Úreturnr+   )r‚   r4   ©rF   ÚstrrH   z-Union[str, Iterable[MessageContentPartParam]]rI   zLiteral['user', 'assistant']r9   z;Optional[Iterable[message_create_params.Attachment]] | Omitr:   úOptional[Metadata] | Omitr;   úHeaders | Noner<   úQuery | Noner=   úBody | Noner>   ú(float | httpx2.Timeout | None | NotGivenr‚   r    ©r]   r„   rF   r„   r;   r†   r<   r‡   r=   rˆ   r>   r‰   r‚   r    ©r]   r„   rF   r„   r:   r…   r;   r†   r<   r‡   r=   rˆ   r>   r‰   r‚   r    )rF   r„   rl   ú
str | Omitrm   rŒ   rn   ú
int | Omitro   úLiteral['asc', 'desc'] | Omitrp   rŒ   r;   r†   r<   r‡   r=   rˆ   r>   r‰   r‚   zSyncCursorPage[Message]©r]   r„   rF   r„   r;   r†   r<   r‡   r=   rˆ   r>   r‰   r‚   r"   ©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r/   r5   Útyping_extensionsÚ
deprecatedr   r   rU   rb   ri   ry   r   Ú__static_attributes__r�   r1   r.   r$   r$      sø  † Ù>àó-ó ð-ð ó3ó ð3ð ×!Ò!Ð"bÓcð TXØ.2ð )-Ø$(Ø"&Ø<EñD
àðD
ð ?ð	D
ð
 +ðD
ð QðD
ð ,ðD
ð &ðD
ð "ðD
ð  ðD
ð :ðD
ð 
ôD
ó dðD
ðL ×!Ò!Ð"bÓcð )-Ø$(Ø"&Ø<Eñ'
àð'
ð ð	'
ð &ð'
ð "ð'
ð  ð'
ð :ð'
ð 
ô'
ó dð'
ðR ×!Ò!Ð"bÓcð /3ð )-Ø$(Ø"&Ø<Eñ0
àð0
ð ð	0
ð
 ,ð0
ð &ð0
ð "ð0
ð  ð0
ð :ð0
ð 
ô0
ó dð0
ðd ×!Ò!Ð"bÓcð
 !Ø!Ø Ø/3Ø!ð )-Ø$(Ø"&Ø<EñF
àðF
ð ð	F
ð
 ðF
ð ðF
ð -ðF
ð ðF
ð &ðF
ð "ðF
ð  ðF
ð :ðF
ð 
!ôF
ó dðF
ðP ×!Ò!Ð"bÓcð )-Ø$(Ø"&Ø<Eñ'
àð'
ð ð	'
ð &ð'
ð "ð'
ð  ð'
ð :ð'
ð 
ô'
ó dó'
r1   c                  ó<  • \ rS rSrSr\SS j5       r\SS j5       r\R                  " S5      \
\
SSS\S.                   SS jj5       r\R                  " S5      SSS\S	.             SS
 jj5       r\R                  " S5      \
SSS\S.               SS jj5       r\R                  " S5      \
\
\
\
\
SSS\S.	                     SS jj5       r\R                  " S5      SSS\S	.             SS jj5       rSrg)r%   iJ  r(   c                ó   • [        U 5      $ r*   )ÚAsyncMessagesWithRawResponser,   s    r.   r/   ÚAsyncMessages.with_raw_responseM  s   € ô ,¨DÓ1Ð1r1   c                ó   • [        U 5      $ r3   )Ú"AsyncMessagesWithStreamingResponser,   s    r.   r5   Ú%AsyncMessages.with_streaming_responseW  s   € ô 2°$Ó7Ð7r1   r7   Nr8   c             ƒ  ó  #   • U(       d  [        SU< 35      eSS0U=(       d    0 EnU R                  [        SUS9[        UU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)r@   rA   rB   rC   rD   rE   rG   NrJ   TrK   rM   )rQ   rR   r   r   r   rS   r   r    rT   s
             r.   rU   ÚAsyncMessages.create`  s°   é € ö^ ÜÐWÐXaÑWdÐeÓfÐfØ&¨ÐQ¸M×<OÈRÐQˆØ—Z‘ZÜÐ9ÀYÑOÜ,à&Ø Ø#.Ø (ñ	ô &×9Ñ9ó÷ ô )Ø+Ø'Ø%ØØ'¨Ð.ñô ð%  ð 
÷ 
ð 	
ññ
ùs$   ‚ABÁB 
ÁBÁ;BÁ<BÂBrW   c             ƒ  óè   #   • U(       d  [        SU< 35      eU(       d  [        SU< 35      eSS0U=(       d    0 EnU R                  [        SX!S9[        UUUUSS0S	9[        S
9I Sh  v•N $  N7f)rY   rA   rZ   rB   rC   r[   r\   rJ   TrK   r^   Nr_   ra   s          r.   rb   ÚAsyncMessages.retrieve§  s˜   é € ö2 ÜÐWÐXaÑWdÐeÓfÐfÞÜÐXÐYcÑXfÐgÓhÐhØ&¨ÐQ¸M×<OÈRÐQˆØ—Y‘YÜÐFÐR[ÑsÜ(Ø+Ø'Ø%ØØ'¨Ð.ñô ð ð 

÷ 

ð 
	
ñ 

ùó   ‚A)A2Á+A0Á,A2rd   c             ƒ  ó2  #   • U(       d  [        SU< 35      eU(       d  [        SU< 35      eSS0U=(       d    0 EnU R                  [        SX!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)rf   rA   rZ   rB   rC   r[   r\   r:   NrJ   TrK   rM   )rQ   rR   r   r   r   rg   r   r    rh   s           r.   ri   ÚAsyncMessages.updateÑ  sµ   é € öB ÜÐWÐXaÑWdÐeÓfÐfÞÜÐXÐYcÑXfÐgÓhÐhØ&¨ÐQ¸M×<OÈRÐQˆØ—Z‘ZÜÐFÐR[ÑsÜ,¨j¸(Ð-CÔEZ×EnÑEnÓo×oÜ(Ø+Ø'Ø%ØØ'¨Ð.ñô ð  ð 
÷ 
ð 	
áoñ
ùs$   ‚A/BÁ1B
Á2BÂBÂBÂBrk   c       	        óö   • U(       d  [        SU< 35      eSS0U=(       d    0 EnU R                  [        SUS9[        [           [        UUU	U
[        UUUUUS.[        R                  5      SS0S	9[        S
9$ rr   )	rQ   rv   r   r   r    r   r   r   rw   rx   s              r.   ry   ÚAsyncMessages.list  s¦   € ö^ ÜÐWÐXaÑWdÐeÓfÐfØ&¨ÐQ¸M×<OÈRÐQˆØ×!Ñ!ÜÐ9ÀYÑOÜ ¤Ñ)Ü(Ø+Ø'Ø%ØÜ%à!&Ø"(Ø!&Ø!&Ø"(ñô (×9Ñ9ó	ð (¨Ð.ñô" ð) "ð 
ð 	
r1   c             ƒ  óè   #   • U(       d  [        SU< 35      eU(       d  [        SU< 35      eSS0U=(       d    0 EnU R                  [        SX!S9[        UUUUSS0S	9[        S
9I Sh  v•N $  N7f)r|   rA   rZ   rB   rC   r[   r\   rJ   TrK   r^   Nr}   ra   s          r.   r   ÚAsyncMessages.deleteM  s˜   é € ö2 ÜÐWÐXaÑWdÐeÓfÐfÞÜÐXÐYcÑXfÐgÓhÐhØ&¨ÐQ¸M×<OÈRÐQˆØ—\‘\ÜÐFÐR[ÑsÜ(Ø+Ø'Ø%ØØ'¨Ð.ñô #ð "ð 

÷ 

ð 
	
ñ 

ùr¤   r�   )r‚   r›   )r‚   rž   rƒ   rŠ   r‹   )rF   r„   rl   rŒ   rm   rŒ   rn   r�   ro   rŽ   rp   rŒ   r;   r†   r<   r‡   r=   rˆ   r>   r‰   r‚   z1AsyncPaginator[Message, AsyncCursorPage[Message]]r�   r�   r�   r1   r.   r%   r%   J  sø  † Ù>àó2ó ð2ð ó8ó ð8ð ×!Ò!Ð"bÓcð TXØ.2ð )-Ø$(Ø"&Ø<EñD
àðD
ð ?ð	D
ð
 +ðD
ð QðD
ð ,ðD
ð &ðD
ð "ðD
ð  ðD
ð :ðD
ð 
ôD
ó dðD
ðL ×!Ò!Ð"bÓcð )-Ø$(Ø"&Ø<Eñ'
àð'
ð ð	'
ð &ð'
ð "ð'
ð  ð'
ð :ð'
ð 
ô'
ó dð'
ðR ×!Ò!Ð"bÓcð /3ð )-Ø$(Ø"&Ø<Eñ0
àð0
ð ð	0
ð
 ,ð0
ð &ð0
ð "ð0
ð  ð0
ð :ð0
ð 
ô0
ó dð0
ðd ×!Ò!Ð"bÓcð
 !Ø!Ø Ø/3Ø!ð )-Ø$(Ø"&Ø<EñF
àðF
ð ð	F
ð
 ðF
ð ðF
ð -ðF
ð ðF
ð &ðF
ð "ðF
ð  ðF
ð :ðF
ð 
;ôF
ó dðF
ðP ×!Ò!Ð"bÓcð )-Ø$(Ø"&Ø<Eñ'
àð'
ð ð	'
ð &ð'
ð "ð'
ð  ð'
ð :ð'
ð 
ô'
ó dó'
r1   c                  ó   • \ rS rSrSS jrSrg)r+   ix  c                ó‚  • 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        [        R                  " UR                  5      U l        g ©N)Ú	_messagesr	   Úto_raw_response_wrapperrU   rb   ri   ry   r   ©r-   Úmessagess     r.   Ú__init__Ú MessagesWithRawResponse.__init__y  sŸ   € Ø!Œô ×4Ò4Ø—‘óð 	Œô ×4Ò4Ø×!Ñ!óð 	Œô ×4Ò4Ø—‘óð 	Œô ×4Ò4Ø—‘óð 	Œ	ô ×4Ò4Ø—‘óð 	�r1   ©r®   rU   r   ry   rb   ri   N©r±   r$   r‚   ÚNone©r‘   r’   r“   r”   r²   r˜   r�   r1   r.   r+   r+   x  ó   † ÷
r1   r+   c                  ó   • \ rS rSrSS jrSrg)r›   i—  c                ó‚  • 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        [        R                  " UR                  5      U l        g r­   )r®   r	   Úasync_to_raw_response_wrapperrU   rb   ri   ry   r   r°   s     r.   r²   Ú%AsyncMessagesWithRawResponse.__init__˜  sŸ   € Ø!Œô ×:Ò:Ø—‘óð 	Œô ×:Ò:Ø×!Ñ!óð 	Œô ×:Ò:Ø—‘óð 	Œô ×:Ò:Ø—‘óð 	Œ	ô ×:Ò:Ø—‘óð 	�r1   r´   N©r±   r%   r‚   r¶   r·   r�   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        [        UR                  5      U l        g r­   )r®   r   rU   rb   ri   ry   r   r°   s     r.   r²   Ú&MessagesWithStreamingResponse.__init__·  s�   € Ø!Œô )Ø—‘óð 	Œô )Ø×!Ñ!óð 	Œô )Ø—‘óð 	Œô )Ø—‘óð 	Œ	ô )Ø—‘óð 	�r1   r´   Nrµ   r·   r�   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        [        UR                  5      U l        g r­   )r®   r   rU   rb   ri   ry   r   r°   s     r.   r²   Ú+AsyncMessagesWithStreamingResponse.__init__Ö  s�   € Ø!Œô /Ø—‘óð 	Œô /Ø×!Ñ!óð 	Œô /Ø—‘óð 	Œô /Ø—‘óð 	Œ	ô /Ø—‘óð 	�r1   r´   Nr½   r·   r�   r1   r.   rž   rž   Õ  r¸   r1   rž   )8Ú
__future__r   r–   Útypingr   r   r   r   Úhttpx2Ú r	   Ú_typesr
   r   r   r   r   r   r   Ú_utilsr   r   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›   r4   rž   r�   r1   r.   Ú<module>rÕ      s�   ðõ #ã ß ,Ñ ,Ý %ã å !ß L× LÑ Lß LÑ LÝ 'ß ;ß Zß :ß Aß dÑ dÝ 2Ý 5Ý AÝ Uà�Ð
'€ôk
ˆô k
ô\	k
Ð$ô k
÷\	
ñ 
÷>
ñ 
÷>
ñ 
÷>
ò 
r1   