
    _j                     L   S SK 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!  SSK"J#r#  SS/r$ " S S\5      r% " S S\5      r& " S S5      r' " S S5      r( " S S5      r) " S S5      r*g)    )annotations)LiteralN   )_legacy_response)BodyOmitQueryHeadersNotGivenomit	not_given)path_templatemaybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)SyncCursorPageAsyncCursorPage)AsyncPaginatormake_request_options)message_list_params)ChatCompletionStoreMessageMessagesAsyncMessagesc                      \ rS 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rg)r      W
Given a list of messages comprising a conversation, the model will return a response.
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    _/home/rurouni/.local/lib/python3.13/site-packages/openai/resources/chat/completions/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2r(   Nafterlimitorderextra_headersextra_query
extra_bodytimeoutc                   U(       d  [        SU< 35      eU R                  [        SUS9[        [           [        UUUU[        UUUS.[        R                  5      SS0S9[        S9$ 	a  Get the messages in a stored chat completion.

Only Chat Completions that have
been created with the `store` parameter set to `true` will be returned.

Args:
  after: Identifier for the last message from the previous pagination request.

  limit: Number of messages to retrieve.

  order: Sort order for messages by timestamp. Use `asc` for ascending order or `desc`
      for descending order. Defaults to `asc`.

  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
z<Expected a non-empty value for `completion_id` but received z*/chat/completions/{completion_id}/messages)completion_id)r/   r0   r1   bearer_authT)r2   r3   r4   r5   querysecurity)pageoptionsmodel)	
ValueError_get_api_listr   r   r   r   r   r   MessageListParams	r$   r8   r/   r0   r1   r2   r3   r4   r5   s	            r%   listMessages.list/   s    F [\i[lmnn!!FVcd :;(+'%%!&!&!&
 (99 (. -% " 
 	
r(    )returnr"   )rF   r+   )r8   strr/   
str | Omitr0   
int | Omitr1   Literal['asc', 'desc'] | Omitr2   Headers | Noner3   Query | Noner4   Body | Noner5   'float | httpx.Timeout | None | NotGivenrF   z*SyncCursorPage[ChatCompletionStoreMessage]__name__
__module____qualname____firstlineno____doc__r   r&   r,   r   r   rC   __static_attributes__rE   r(   r%   r   r      s     - - 3 3 ! /3 )-$("&;D8
8
 	8

 8
 -8
 &8
 "8
  8
 98
 
48
 8
r(   c                      \ rS 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rg)r   j   r   c                    [        U 5      $ r!   )AsyncMessagesWithRawResponser#   s    r%   r&   AsyncMessages.with_raw_responseo   s     ,D11r(   c                    [        U 5      $ r*   )"AsyncMessagesWithStreamingResponser#   s    r%   r,   %AsyncMessages.with_streaming_responsey   s     2$77r(   Nr.   c                   U(       d  [        SU< 35      eU R                  [        SUS9[        [           [        UUUU[        UUUS.[        R                  5      SS0S9[        S9$ r7   )	r?   r@   r   r   r   r   r   r   rA   rB   s	            r%   rC   AsyncMessages.list   s    F [\i[lmnn!!FVcd !;<(+'%%!&!&!&
 (99 (. -% " 
 	
r(   rE   )rF   rY   )rF   r\   )r8   rG   r/   rH   r0   rI   r1   rJ   r2   rK   r3   rL   r4   rM   r5   rN   rF   zWAsyncPaginator[ChatCompletionStoreMessage, AsyncCursorPage[ChatCompletionStoreMessage]]rO   rE   r(   r%   r   r   j   s     2 2 8 8 ! /3 )-$("&;D8
8
 	8

 8
 -8
 &8
 "8
  8
 98
 
a8
 8
r(   c                      \ rS rSrSS jrSrg)r"      c                Z    Xl         [        R                  " UR                  5      U l        g N)	_messagesr   to_raw_response_wrapperrC   r$   messagess     r%   __init__ MessagesWithRawResponse.__init__   s     !$<<MM
	r(   rd   rC   Nrg   r   rF   NonerP   rQ   rR   rS   rh   rU   rE   r(   r%   r"   r"          
r(   r"   c                      \ rS rSrSS jrSrg)rY      c                Z    Xl         [        R                  " UR                  5      U l        g rc   )rd   r   async_to_raw_response_wrapperrC   rf   s     r%   rh   %AsyncMessagesWithRawResponse.__init__   s     !$BBMM
	r(   rj   Nrg   r   rF   rl   rm   rE   r(   r%   rY   rY      rn   r(   rY   c                      \ rS rSrSS jrSrg)r+      c                D    Xl         [        UR                  5      U l        g rc   )rd   r   rC   rf   s     r%   rh   &MessagesWithStreamingResponse.__init__   s    !0MM
	r(   rj   Nrk   rm   rE   r(   r%   r+   r+      rn   r(   r+   c                      \ rS rSrSS jrSrg)r\      c                D    Xl         [        UR                  5      U l        g rc   )rd   r   rC   rf   s     r%   rh   +AsyncMessagesWithStreamingResponse.__init__   s    !6MM
	r(   rj   Nrt   rm   rE   r(   r%   r\   r\      rn   r(   r\   )+
__future__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.chat.completionsr   (types.chat.chat_completion_store_messager   __all__r   r   r"   rY   r+   r\   rE   r(   r%   <module>r      s    # %  ! L L L 5 ' ; Z : A : S
'P
 P
fP
$ P
f
 

 

 

 
r(   