
    _iJ                    H   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  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)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S j5       r\S	S j5       r\\\SSS\S.                 S
S jjr	Sr
g)r      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    f/var/www/html/land-ocr/venv/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3[        [           [	        UUUU[        UUUS.[        R                  5      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/z	/messages)r-   r.   r/   )r0   r1   r2   r3   query)pageoptionsmodel)
ValueError_get_api_listr   r   r   r   r   MessageListParams	r"   completion_idr-   r.   r/   r0   r1   r2   r3   s	            r#   listMessages.list+   s    F [\i[lmnn!! y9 :;(+'%%!&!&!&
 (99 -# " 
 	
r&    )returnr    )rB   r)   )r>   strr-   
str | Omitr.   
int | Omitr/   Literal['asc', 'desc'] | Omitr0   Headers | Noner1   Query | Noner2   Body | Noner3   'float | httpx.Timeout | None | NotGivenrB   z*SyncCursorPage[ChatCompletionStoreMessage]__name__
__module____qualname____firstlineno__r   r$   r*   r   r   r?   __static_attributes__rA   r&   r#   r   r      s    - - 3 3 ! /3 )-$("&;D7
7
 	7

 7
 -7
 &7
 "7
  7
 97
 
47
 7
r&   c                  |    \ 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   e   c                    [        U 5      $ r   )AsyncMessagesWithRawResponser!   s    r#   r$   AsyncMessages.with_raw_responsef   s     ,D11r&   c                    [        U 5      $ r(   )"AsyncMessagesWithStreamingResponser!   s    r#   r*   %AsyncMessages.with_streaming_responsep   s     2$77r&   Nr,   c                   U(       d  [        SU< 35      eU R                  SU S3[        [           [	        UUUU[        UUUS.[        R                  5      S9[        S9$ r5   )r:   r;   r   r   r   r   r   r<   r=   s	            r#   r?   AsyncMessages.listy   s    F [\i[lmnn!! y9 !;<(+'%%!&!&!&
 (99 -# " 
 	
r&   rA   )rB   rT   )rB   rW   )r>   rC   r-   rD   r.   rE   r/   rF   r0   rG   r1   rH   r2   rI   r3   rJ   rB   zWAsyncPaginator[ChatCompletionStoreMessage, AsyncCursorPage[ChatCompletionStoreMessage]]rK   rA   r&   r#   r   r   e   s    2 2 8 8 ! /3 )-$("&;D7
7
 	7

 7
 -7
 &7
 "7
  7
 97
 
a7
 7
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_wrapperr?   r"   messagess     r#   __init__ MessagesWithRawResponse.__init__   s     !$<<MM
	r&   r_   r?   Nrb   r   rB   NonerL   rM   rN   rO   rc   rP   rA   r&   r#   r    r           
r&   r    c                      \ rS rSrSS jrSrg)rT      c                Z    Xl         [        R                  " UR                  5      U l        g r^   )r_   r   async_to_raw_response_wrapperr?   ra   s     r#   rc   %AsyncMessagesWithRawResponse.__init__   s     !$BBMM
	r&   re   Nrb   r   rB   rg   rh   rA   r&   r#   rT   rT      ri   r&   rT   c                      \ rS rSrSS jrSrg)r)      c                D    Xl         [        UR                  5      U l        g r^   )r_   r   r?   ra   s     r#   rc   &MessagesWithStreamingResponse.__init__   s    !0MM
	r&   re   Nrf   rh   rA   r&   r#   r)   r)      ri   r&   r)   c                      \ rS rSrSS jrSrg)rW      c                D    Xl         [        UR                  5      U l        g r^   )r_   r   r?   ra   s     r#   rc   +AsyncMessagesWithStreamingResponse.__init__   s    !6MM
	r&   re   Nro   rh   rA   r&   r#   rW   rW      ri   r&   rW   )*
__future__r   typing_extensionsr   httpx r   _typesr   r   r	   r
   r   r   r   _utilsr   _compatr   	_resourcer   r   	_responser   r   
paginationr   r   _base_clientr   r   types.chat.completionsr   (types.chat.chat_completion_store_messager   __all__r   r   r    rT   r)   rW   rA   r&   r#   <module>r      s    # %  ! L L L & ' ; Z : A : S
'K
 K
\K
$ K
\
 

 

 

 
r&   