Ë
    $Æ%ht  ã                  ó@  — d dl 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 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 ddlm Z  ddgZ! G d„ de«      Z" G d„ de«      Z# G d„ d«      Z$ G d„ d«      Z% G d„ d«      Z& G d„ d«      Z'y)é    )Úannotations)ÚLiteralNé   )Ú_legacy_response)Ú	NOT_GIVENÚBodyÚQueryÚHeadersÚNotGiven)Ú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                  ól   — e Zd Zedd„«       Zedd„«       Zeee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    úh/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/openai/resources/chat/completions/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©ÚafterÚlimitÚorderÚextra_headersÚextra_queryÚ
extra_bodyÚtimeoutc               óÆ   — |st        d|›�«      ‚| j                  d|› d�t        t           t	        ||||t        |||dœt        j                  «      ¬«      t        ¬«      S ©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*   )r+   r,   r-   r.   Úquery)ÚpageÚoptionsÚmodel)Ú
ValueErrorÚ_get_api_listr   r   r   r   r   ÚMessageListParams©	r   Úcompletion_idr(   r)   r*   r+   r,   r-   r.   s	            r    ÚlistzMessages.list+   s„   € ñF ÜÐ[Ð\iÐ[lÐmÓnÐnØ×!Ñ!Ø   ¨yÐ9ÜÔ :Ñ;Ü(Ø+Ø'Ø%ØÜ%à!&Ø!&Ø!&ñô
 (×9Ñ9óôô -ð# "ó 
ð 	
r"   )Úreturnr   )r;   r%   )r9   Ústrr(   ústr | NotGivenr)   úint | NotGivenr*   ú!Literal['asc', 'desc'] | NotGivenr+   úHeaders | Noner,   úQuery | Noner-   úBody | Noner.   ú'float | httpx.Timeout | None | NotGivenr;   z*SyncCursorPage[ChatCompletionStoreMessage]©Ú__name__Ú
__module__Ú__qualname__r   r!   r&   r   r:   © r"   r    r   r      sž   „ Øò-ó ð-ð ò3ó ð3ð !*Ø )Ø3<ð )-Ø$(Ø"&Ø;Dñ7
àð7
ð ð	7
ð
 ð7
ð 1ð7
ð &ð7
ð "ð7
ð  ð7
ð 9ð7
ð 
4ô7
r"   c                  ól   — e Zd Zedd„«       Zedd„«       Zeeedddedœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„Zy)	r   c                ó   — t        | «      S r   )ÚAsyncMessagesWithRawResponser   s    r    r!   zAsyncMessages.with_raw_responsef   s   € ô ,¨DÓ1Ð1r"   c                ó   — t        | «      S r$   )Ú"AsyncMessagesWithStreamingResponser   s    r    r&   z%AsyncMessages.with_streaming_responsep   s   € ô 2°$Ó7Ð7r"   Nr'   c               óÆ   — |st        d|›�«      ‚| j                  d|› d�t        t           t	        ||||t        |||dœt        j                  «      ¬«      t        ¬«      S r0   )r5   r6   r   r   r   r   r   r7   r8   s	            r    r:   zAsyncMessages.listy   s„   € ñF ÜÐ[Ð\iÐ[lÐmÓnÐnØ×!Ñ!Ø   ¨yÐ9Ü Ô!;Ñ<Ü(Ø+Ø'Ø%ØÜ%à!&Ø!&Ø!&ñô
 (×9Ñ9óôô -ð# "ó 
ð 	
r"   )r;   rK   )r;   rM   )r9   r<   r(   r=   r)   r>   r*   r?   r+   r@   r,   rA   r-   rB   r.   rC   r;   zWAsyncPaginator[ChatCompletionStoreMessage, AsyncCursorPage[ChatCompletionStoreMessage]]rD   rH   r"   r    r   r   e   sŸ   „ Øò2ó ð2ð ò8ó ð8ð !*Ø )Ø3<ð )-Ø$(Ø"&Ø;Dñ7
àð7
ð ð	7
ð
 ð7
ð 1ð7
ð &ð7
ð "ð7
ð  ð7
ð 9ð7
ð 
aô7
r"   c                  ó   — e Zd Zdd„Zy)r   c                óZ   — || _         t        j                  |j                  «      | _        y ©N)Ú	_messagesr   Úto_raw_response_wrapperr:   ©r   Úmessagess     r    Ú__init__z MessagesWithRawResponse.__init__´   s"   € Ø!ˆŒä$×<Ñ<Ø�M‰Mó
ˆ�	r"   N©rU   r   r;   ÚNone©rE   rF   rG   rV   rH   r"   r    r   r   ³   ó   „ ô
r"   r   c                  ó   — e Zd Zdd„Zy)rK   c                óZ   — || _         t        j                  |j                  «      | _        y rQ   )rR   r   Úasync_to_raw_response_wrapperr:   rT   s     r    rV   z%AsyncMessagesWithRawResponse.__init__½   s"   € Ø!ˆŒä$×BÑBØ�M‰Mó
ˆ�	r"   N©rU   r   r;   rX   rY   rH   r"   r    rK   rK   ¼   rZ   r"   rK   c                  ó   — e Zd Zdd„Zy)r%   c                óF   — || _         t        |j                  «      | _        y rQ   )rR   r   r:   rT   s     r    rV   z&MessagesWithStreamingResponse.__init__Æ   s   € Ø!ˆŒä0Ø�M‰Mó
ˆ�	r"   NrW   rY   rH   r"   r    r%   r%   Å   rZ   r"   r%   c                  ó   — e Zd Zdd„Zy)rM   c                óF   — || _         t        |j                  «      | _        y rQ   )rR   r   r:   rT   s     r    rV   z+AsyncMessagesWithStreamingResponse.__init__Ï   s   € Ø!ˆŒä6Ø�M‰Mó
ˆ�	r"   Nr^   rY   rH   r"   r    rM   rM   Î   rZ   r"   rM   )(Ú
__future__r   Útyping_extensionsr   ÚhttpxÚ r   Ú_typesr   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   rK   r%   rM   rH   r"   r    ú<module>rq      s‚   ðõ #å %ã å !ß @Õ @Ý &Ý 'ß ;ß Zß :ß AÝ :Ý Sà�Ð
'€ôK
ˆô K
ô\K
Ð$ô K
÷\
ñ 
÷
ñ 
÷
ñ 
÷
ò 
r"   