Ë
    «ëiHP  ã                  óx  — d dl mZ d dl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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% 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«      Z. G d„ d«      Z/ G d„ d«      Z0 G d„ d«      Z1 G d„ d«      Z2y)é    )Úannotations)ÚAnyÚcast)Ú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)ÚSyncConversationCursorPageÚAsyncConversationCursorPage)ÚAsyncPaginatorÚmake_request_options)Úthread_list_paramsÚthread_list_items_params)ÚChatKitThread)ÚThreadDeleteResponse)ÚDataÚThreadsÚAsyncThreadsc            
      ó
  — e Zd Zedd„«       Zedd„«       Z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
e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
        )ÚThreadsWithRawResponse©Úselfs    úe/var/www/html/chat/reports/venv/lib/python3.12/site-packages/openai/resources/beta/chatkit/threads.pyÚwith_raw_responsezThreads.with_raw_response   s   € ô & dÓ+Ð+ó    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
        )ÚThreadsWithStreamingResponser&   s    r(   Úwith_streaming_responsezThreads.with_streaming_response%   s   € ô ,¨DÓ1Ð1r*   N©Úextra_headersÚextra_queryÚ
extra_bodyÚtimeoutc          	     ó–   — |st        d|›�«      ‚ddi|xs i ¥}| j                  t        d|¬«      t        ||||¬«      t        ¬«      S )á`  
        Retrieve a ChatKit thread by its identifier.

        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
        ú8Expected a non-empty value for `thread_id` but received úOpenAI-Betaúchatkit_beta=v1ú/chatkit/threads/{thread_id}©Ú	thread_idr/   ©ÚoptionsÚcast_to©Ú
ValueErrorÚ_getr   r   r   ©r'   r;   r0   r1   r2   r3   s         r(   ÚretrievezThreads.retrieve.   sj   € ñ. ÜÐWÐXaÐWdÐeÓfÐfØ&Ð(9ÐS¸mÒ>QÈrÐSˆØ�y‰yÜÐ8ÀIÔNÜ(Ø+¸ÐQ[Ðelôô "ð ó 
ð 	
r*   ©	ÚafterÚbeforeÚlimitÚorderÚuserr0   r1   r2   r3   c       	        ó¶   — ddi|xs i ¥}| j                  dt        t           t        ||||	t	        |||||dœt
        j                  «      ¬«      t        ¬«      S ©as  
        List ChatKit threads with optional pagination and user filters.

        Args:
          after: List items created after this thread item ID. Defaults to null for the first
              page.

          before: List items created before this thread item ID. Defaults to null for the newest
              results.

          limit: Maximum number of thread items to return. Defaults to 20.

          order: Sort order for results by creation time. Defaults to `desc`.

          user: Filter threads that belong to this user identifier. Defaults to null to return
              all users.

          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
        r7   r8   z/chatkit/threads)rE   rF   rG   rH   rI   ©r0   r1   r2   r3   Úquery©Úpager=   Úmodel)Ú_get_api_listr   r   r   r   r   ÚThreadListParams©
r'   rE   rF   rG   rH   rI   r0   r1   r2   r3   s
             r(   ÚlistzThreads.listP   s}   € ðP 'Ð(9ÐS¸mÒ>QÈrÐSˆØ×!Ñ!ØÜ+¬MÑ:Ü(Ø+Ø'Ø%ØÜ%à!&Ø"(Ø!&Ø!&Ø $ñô '×7Ñ7ó	ôô   ð' "ó 
ð 	
r*   c          	     ó–   — |st        d|›�«      ‚ddi|xs i ¥}| j                  t        d|¬«      t        ||||¬«      t        ¬«      S )áx  
        Delete a ChatKit thread along with its items and stored attachments.

        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
        r6   r7   r8   r9   r:   r/   r<   ©r@   Ú_deleter   r   r   rB   s         r(   ÚdeletezThreads.delete�   sj   € ñ. ÜÐWÐXaÐWdÐeÓfÐfØ&Ð(9ÐS¸mÒ>QÈrÐSˆØ�|‰|ÜÐ8ÀIÔNÜ(Ø+¸ÐQ[Ðelôô )ð ó 
ð 	
r*   ©rE   rF   rG   rH   r0   r1   r2   r3   c               ó  — |st        d|›�«      ‚ddi|xs i ¥}| j                  t        d|¬«      t        t           t        ||||	t        ||||dœt        j                  «      ¬«      t        t        t        «      ¬«      S ©	aæ  
        List items that belong to a ChatKit thread.

        Args:
          after: List items created after this thread item ID. Defaults to null for the first
              page.

          before: List items created before this thread item ID. Defaults to null for the newest
              results.

          limit: Maximum number of thread items to return. Defaults to 20.

          order: Sort order for results by creation time. Defaults to `desc`.

          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
        r6   r7   r8   z"/chatkit/threads/{thread_id}/itemsr:   )rE   rF   rG   rH   rL   rN   )r@   rQ   r   r   r   r   r   r   ÚThreadListItemsParamsr   r   ©
r'   r;   rE   rF   rG   rH   r0   r1   r2   r3   s
             r(   Ú
list_itemszThreads.list_items±   s    € ñJ ÜÐWÐXaÐWdÐeÓfÐfØ&Ð(9ÐS¸mÒ>QÈrÐSˆØ×!Ñ!ÜÐ>È)ÔTÜ+¬DÑ1Ü(Ø+Ø'Ø%ØÜ%à!&Ø"(Ø!&Ø!&ñ	ô -×BÑBóôô ”sœD“/ð% "ó 
ð 	
r*   )Úreturnr%   )r`   r-   ©r;   Ústrr0   úHeaders | Noner1   úQuery | Noner2   úBody | Noner3   ú'float | httpx.Timeout | None | NotGivenr`   r   )rE   ú
str | OmitrF   rg   rG   ú
int | OmitrH   úLiteral['asc', 'desc'] | OmitrI   rg   r0   rc   r1   rd   r2   re   r3   rf   r`   z)SyncConversationCursorPage[ChatKitThread]©r;   rb   r0   rc   r1   rd   r2   re   r3   rf   r`   r   )r;   rb   rE   rg   rF   rg   rG   rh   rH   ri   r0   rc   r1   rd   r2   re   r3   rf   r`   z SyncConversationCursorPage[Data]©Ú__name__Ú
__module__Ú__qualname__r   r)   r.   r   rC   r   rT   rY   r_   © r*   r(   r    r       sÐ  „ Øò,ó ð,ð ò2ó ð2ð )-Ø$(Ø"&Ø;Dñ 
àð 
ð &ð 
ð "ð 
ð  ð 
ð 9ð 
ð 
ó 
ðJ !Ø!Ø Ø/3Øð )-Ø$(Ø"&Ø;Dñ=
ð ð=
ð ð	=
ð
 ð=
ð -ð=
ð ð=
ð &ð=
ð "ð=
ð  ð=
ð 9ð=
ð 
3ó=
ðJ )-Ø$(Ø"&Ø;Dñ 
àð 
ð &ð 
ð "ð 
ð  ð 
ð 9ð 
ð 
ó 
ðL !Ø!Ø Ø/3ð )-Ø$(Ø"&Ø;Dñ;
àð;
ð ð	;
ð
 ð;
ð ð;
ð -ð;
ð &ð;
ð "ð;
ð  ð;
ð 9ð;
ð 
*ô;
r*   c            
      ó
  — e Zd Zedd„«       Zedd„«       Z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
eeeeddded	œ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd
„Zy)r!   c                ó   — t        | «      S r$   )ÚAsyncThreadsWithRawResponser&   s    r(   r)   zAsyncThreads.with_raw_responseð   s   € ô +¨4Ó0Ð0r*   c                ó   — t        | «      S r,   )Ú!AsyncThreadsWithStreamingResponser&   s    r(   r.   z$AsyncThreads.with_streaming_responseú   s   € ô 1°Ó6Ð6r*   Nr/   c          	   ƒ  ó²   K  — |st        d|›�«      ‚ddi|xs i ¥}| j                  t        d|¬«      t        ||||¬«      t        ¬«      ƒ d{  –—† S 7 Œ­w)	r5   r6   r7   r8   r9   r:   r/   r<   Nr?   rB   s         r(   rC   zAsyncThreads.retrieve  sx   è ø€ ñ. ÜÐWÐXaÐWdÐeÓfÐfØ&Ð(9ÐS¸mÒ>QÈrÐSˆØ—Y‘YÜÐ8ÀIÔNÜ(Ø+¸ÐQ[Ðelôô "ð ó 
÷ 
ð 	
ð 
úó   ‚AAÁAÁArD   c       	        ó¶   — ddi|xs i ¥}| j                  dt        t           t        ||||	t	        |||||dœt
        j                  «      ¬«      t        ¬«      S rK   )rQ   r   r   r   r   r   rR   rS   s
             r(   rT   zAsyncThreads.list%  s}   € ðP 'Ð(9ÐS¸mÒ>QÈrÐSˆØ×!Ñ!ØÜ,¬]Ñ;Ü(Ø+Ø'Ø%ØÜ%à!&Ø"(Ø!&Ø!&Ø $ñô '×7Ñ7ó	ôô   ð' "ó 
ð 	
r*   c          	   ƒ  ó²   K  — |st        d|›�«      ‚ddi|xs i ¥}| j                  t        d|¬«      t        ||||¬«      t        ¬«      ƒ d{  –—† S 7 Œ­w)	rV   r6   r7   r8   r9   r:   r/   r<   NrW   rB   s         r(   rY   zAsyncThreads.deleted  sx   è ø€ ñ. ÜÐWÐXaÐWdÐeÓfÐfØ&Ð(9ÐS¸mÒ>QÈrÐSˆØ—\‘\ÜÐ8ÀIÔNÜ(Ø+¸ÐQ[Ðelôô )ð "ó 
÷ 
ð 	
ð 
úrv   rZ   c               ó  — |st        d|›�«      ‚ddi|xs i ¥}| j                  t        d|¬«      t        t           t        ||||	t        ||||dœt        j                  «      ¬«      t        t        t        «      ¬«      S r\   )r@   rQ   r   r   r   r   r   r   r]   r   r   r^   s
             r(   r_   zAsyncThreads.list_items†  s    € ñJ ÜÐWÐXaÐWdÐeÓfÐfØ&Ð(9ÐS¸mÒ>QÈrÐSˆØ×!Ñ!ÜÐ>È)ÔTÜ,¬TÑ2Ü(Ø+Ø'Ø%ØÜ%à!&Ø"(Ø!&Ø!&ñ	ô -×BÑBóôô ”sœD“/ð% "ó 
ð 	
r*   )r`   rr   )r`   rt   ra   )rE   rg   rF   rg   rG   rh   rH   ri   rI   rg   r0   rc   r1   rd   r2   re   r3   rf   r`   zIAsyncPaginator[ChatKitThread, AsyncConversationCursorPage[ChatKitThread]]rj   )r;   rb   rE   rg   rF   rg   rG   rh   rH   ri   r0   rc   r1   rd   r2   re   r3   rf   r`   z7AsyncPaginator[Data, AsyncConversationCursorPage[Data]]rk   ro   r*   r(   r!   r!   ï   sÒ  „ Øò1ó ð1ð ò7ó ð7ð )-Ø$(Ø"&Ø;Dñ 
àð 
ð &ð 
ð "ð 
ð  ð 
ð 9ð 
ð 
ó 
ðJ !Ø!Ø Ø/3Øð )-Ø$(Ø"&Ø;Dñ=
ð ð=
ð ð	=
ð
 ð=
ð -ð=
ð ð=
ð &ð=
ð "ð=
ð  ð=
ð 9ð=
ð 
Só=
ðJ )-Ø$(Ø"&Ø;Dñ 
àð 
ð &ð 
ð "ð 
ð  ð 
ð 9ð 
ð 
ó 
ðL !Ø!Ø Ø/3ð )-Ø$(Ø"&Ø;Dñ;
àð;
ð ð	;
ð
 ð;
ð ð;
ð -ð;
ð &ð;
ð "ð;
ð  ð;
ð 9ð;
ð 
Aô;
r*   c                  ó   — e Zd Zdd„Zy)r%   c                ó2  — || _         t        j                  |j                  «      | _        t        j                  |j                  «      | _        t        j                  |j
                  «      | _        t        j                  |j                  «      | _        y ©N)Ú_threadsr   Úto_raw_response_wrapperrC   rT   rY   r_   ©r'   Úthreadss     r(   Ú__init__zThreadsWithRawResponse.__init__Å  sw   € ØˆŒä(×@Ñ@Ø×Ñó
ˆŒô %×<Ñ<Ø�L‰Ló
ˆŒ	ô '×>Ñ>Ø�N‰Nó
ˆŒô +×BÑBØ×Ñó
ˆ�r*   N©r€   r    r`   ÚNone©rl   rm   rn   r�   ro   r*   r(   r%   r%   Ä  ó   „ ô
r*   r%   c                  ó   — e Zd Zdd„Zy)rr   c                ó2  — || _         t        j                  |j                  «      | _        t        j                  |j                  «      | _        t        j                  |j
                  «      | _        t        j                  |j                  «      | _        y r|   )r}   r   Úasync_to_raw_response_wrapperrC   rT   rY   r_   r   s     r(   r�   z$AsyncThreadsWithRawResponse.__init__×  sw   € ØˆŒä(×FÑFØ×Ñó
ˆŒô %×BÑBØ�L‰Ló
ˆŒ	ô '×DÑDØ�N‰Nó
ˆŒô +×HÑHØ×Ñó
ˆ�r*   N©r€   r!   r`   rƒ   r„   ro   r*   r(   rr   rr   Ö  r…   r*   rr   c                  ó   — e Zd Zdd„Zy)r-   c                óâ   — || _         t        |j                  «      | _        t        |j                  «      | _        t        |j                  «      | _        t        |j
                  «      | _        y r|   )r}   r   rC   rT   rY   r_   r   s     r(   r�   z%ThreadsWithStreamingResponse.__init__é  s_   € ØˆŒä4Ø×Ñó
ˆŒô 1Ø�L‰Ló
ˆŒ	ô 3Ø�N‰Nó
ˆŒô 7Ø×Ñó
ˆ�r*   Nr‚   r„   ro   r*   r(   r-   r-   è  r…   r*   r-   c                  ó   — e Zd Zdd„Zy)rt   c                óâ   — || _         t        |j                  «      | _        t        |j                  «      | _        t        |j                  «      | _        t        |j
                  «      | _        y r|   )r}   r   rC   rT   rY   r_   r   s     r(   r�   z*AsyncThreadsWithStreamingResponse.__init__û  s_   € ØˆŒä:Ø×Ñó
ˆŒô 7Ø�L‰Ló
ˆŒ	ô 9Ø�N‰Nó
ˆŒô =Ø×Ñó
ˆ�r*   Nr‰   r„   ro   r*   r(   rt   rt   ú  r…   r*   rt   )3Ú
__future__r   Útypingr   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.beta.chatkitr   r   Ú!types.beta.chatkit.chatkit_threadr   Ú)types.beta.chatkit.thread_delete_responser   Ú+types.beta.chatkit.chatkit_thread_item_listr   Ú__all__r    r!   r%   rr   r-   rt   ro   r*   r(   ú<module>rŸ      sŽ   ðõ #ç Ý %ã å !ß L× LÑ Lß 5Ý 'ß ;ß Zß Rß Aß OÝ ?Ý NÝ @à�nÐ
%€ôR
ˆoô R
ôjR
Ð#ô R
÷j
ñ 
÷$
ñ 
÷$
ñ 
÷$
ò 
r*   