
    -2i=.                       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 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 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,dS )    )annotationsN   )_legacy_response)BodyOmitQueryHeadersNotGivenomit	not_given)maybe_transformasync_maybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)make_request_options)ChatSessionWorkflowParamChatSessionRateLimitsParamChatSessionExpiresAfterParam$ChatSessionChatKitConfigurationParamsession_create_params)ChatSession)r   )r   )r   )r   SessionsAsyncSessionsc                  l    e Zd Zedd            Zed d            Zeeedddedd!dZdddedd"dZ	dS )#r   returnSessionsWithRawResponsec                     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
        )r   selfs    e/var/www/html/pixcura-vrs/venv/lib/python3.11/site-packages/openai/resources/beta/chatkit/sessions.pywith_raw_responsezSessions.with_raw_response   s     't,,,    SessionsWithStreamingResponsec                     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
        )r'   r"   s    r$   with_streaming_responsez Sessions.with_streaming_response)   s     -T222r&   Nchatkit_configurationexpires_afterrate_limitsextra_headersextra_query
extra_bodytimeoutuserstrworkflowr   r,   +ChatSessionChatKitConfigurationParam | Omitr-   #ChatSessionExpiresAfterParam | Omitr.   !ChatSessionRateLimitsParam | Omitr/   Headers | Noner0   Query | Noner1   Body | Noner2   'float | httpx.Timeout | None | NotGivenr   c       	            ddi|pi }|                      dt          |||||dt          j                  t	          ||||	          t
                    S )t  
        Create a ChatKit session

        Args:
          user: A free-form string that identifies your end user; ensures this Session can
              access other objects that have the same `user` scope.

          workflow: Workflow that powers the session.

          chatkit_configuration: Optional overrides for ChatKit runtime configuration features

          expires_after: Optional override for session expiration timing in seconds from creation.
              Defaults to 10 minutes.

          rate_limits: Optional override for per-minute request limits. When omitted, defaults to 10.

          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
        OpenAI-Betachatkit_beta=v1/chatkit/sessionsr3   r5   r,   r-   r.   r/   r0   r1   r2   bodyoptionscast_to)_postr   r   SessionCreateParamsr   r   
r#   r3   r5   r,   r-   r.   r/   r0   r1   r2   s
             r$   createzSessions.create2   s    N '(9Sm>QrSzz   (-B%2#.  &9	 	 )+Q[el      
 
 	
r&   rC   
session_idc          	         |st          d|          ddi|pi }|                     d| dt          ||||          t                    S )L  
        Cancel a ChatKit session

        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
        9Expected a non-empty value for `session_id` but received r?   r@   /chatkit/sessions//cancelrC   rF   rG   
ValueErrorrH   r   r   r#   rL   r/   r0   r1   r2   s         r$   cancelzSessions.cancell   s    .  	igYcgghhh&(9Sm>QrSzz4444(+Q[el      
 
 	
r&   )r   r   )r   r'   r3   r4   r5   r   r,   r6   r-   r7   r.   r8   r/   r9   r0   r:   r1   r;   r2   r<   r   r   rL   r4   r/   r9   r0   r:   r1   r;   r2   r<   r   r   
__name__
__module____qualname__r   r%   r*   r   r   rK   rV    r&   r$   r   r      s        - - - _- 3 3 3 _3 NR=A9= )-$("&;D8
 8
 8
 8
 8
 8
@ )-$("&;D 
  
  
  
  
  
  
  
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dddedd"dZ	dS )#r   r   AsyncSessionsWithRawResponsec                     t          |           S r!   )r_   r"   s    r$   r%   zAsyncSessions.with_raw_response   s     ,D111r&   "AsyncSessionsWithStreamingResponsec                     t          |           S r)   )ra   r"   s    r$   r*   z%AsyncSessions.with_streaming_response   s     2$777r&   Nr+   r3   r4   r5   r   r,   r6   r-   r7   r.   r8   r/   r9   r0   r:   r1   r;   r2   r<   r   c       	           K   ddi|pi }|                      dt          |||||dt          j                   d{V t	          ||||	          t
                     d{V S )r>   r?   r@   rA   rB   NrC   rD   )rH   r   r   rI   r   r   rJ   s
             r$   rK   zAsyncSessions.create   s      N '(9Sm>QrSZZ,  (-B%2#.  &9	 	 	 	 	 	 	 	 )+Q[el       
 
 
 
 
 
 
 
 	
r&   rC   rL   c          	        K   |st          d|          ddi|pi }|                     d| dt          ||||          t                     d{V S )	rN   rO   r?   r@   rP   rQ   rC   rR   NrS   rU   s         r$   rV   zAsyncSessions.cancel   s      .  	igYcgghhh&(9Sm>QrSZZ4444(+Q[el       
 
 
 
 
 
 
 
 	
r&   )r   r_   )r   ra   rW   rX   rY   r]   r&   r$   r   r      s        2 2 2 _2 8 8 8 _8 NR=A9= )-$("&;D8
 8
 8
 8
 8
 8
@ )-$("&;D 
  
  
  
  
  
  
  
r&   c                      e Zd ZddZdS )r   sessionsr   r   Nonec                    || _         t          j        |j                  | _        t          j        |j                  | _        d S N)	_sessionsr   to_raw_response_wrapperrK   rV   r#   rf   s     r$   __init__z SessionsWithRawResponse.__init__  sA    !&>O
 
 '>O
 
r&   Nrf   r   r   rg   rZ   r[   r\   rm   r]   r&   r$   r   r      (        
 
 
 
 
 
r&   r   c                      e Zd ZddZdS )r_   rf   r   r   rg   c                    || _         t          j        |j                  | _        t          j        |j                  | _        d S ri   )rj   r   async_to_raw_response_wrapperrK   rV   rl   s     r$   rm   z%AsyncSessionsWithRawResponse.__init__  sA    !&DO
 
 'DO
 
r&   Nrf   r   r   rg   ro   r]   r&   r$   r_   r_     rp   r&   r_   c                      e Zd ZddZdS )r'   rf   r   r   rg   c                x    || _         t          |j                  | _        t          |j                  | _        d S ri   )rj   r   rK   rV   rl   s     r$   rm   z&SessionsWithStreamingResponse.__init__  s;    !2O
 
 3O
 
r&   Nrn   ro   r]   r&   r$   r'   r'     rp   r&   r'   c                      e Zd ZddZdS )ra   rf   r   r   rg   c                x    || _         t          |j                  | _        t          |j                  | _        d S ri   )rj   r   rK   rV   rl   s     r$   rm   z+AsyncSessionsWithStreamingResponse.__init__%  s;    !8O
 
 9O
 
r&   Nrt   ro   r]   r&   r$   ra   ra   $  rp   r&   ra   )-
__future__r   httpx r   _typesr   r   r   r	   r
   r   r   _utilsr   r   _compatr   	_resourcer   r   	_responser   r   _base_clientr   types.beta.chatkitr   r   r   r   r   types.beta.chatkit.chat_sessionr   .types.beta.chatkit.chat_session_workflow_param1types.beta.chatkit.chat_session_rate_limits_param3types.beta.chatkit.chat_session_expires_after_param;types.beta.chatkit.chat_session_chatkit_configuration_param__all__r   r   r   r_   r'   ra   r]   r&   r$   <module>r      s   # " " " " "  ! ! ! ! ! ! L L L L L L L L L L L L L L L L L L = = = = = = = = ' ' ' ' ' ' ; ; ; ; ; ; ; ; Z Z Z Z Z Z Z Z 1 1 1 1 1 1              < ; ; ; ; ; W W W W W W \ \ \ \ \ \ ` ` ` ` ` ` p p p p p p
'n
 n
 n
 n
 n
 n
 n
 n
bn
 n
 n
 n
 n
$ n
 n
 n
b	
 	
 	
 	
 	
 	
 	
 	
	
 	
 	
 	
 	
 	
 	
 	
	
 	
 	
 	
 	
 	
 	
 	
	
 	
 	
 	
 	
 	
 	
 	
 	
 	
r&   