
    hj$                    Z   d Z ddlmZmZmZmZ ddlmZmZm	Z	 ddl
mZmZ ddlmZmZ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Zd	dlmZmZmZmZmZmZm Z m!Z!  G d de          Z" G d d          Z# G d d          Z$ G d de          Z% G d d          Z& G d d          Z'd
S )zACode generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.   )errorsmodelstypesutils)AfterParseErrorContextHookContextResponseContext)AsyncBaseSDKBaseSDK)	BaseModelOptionalNullableUNSETinteractions)get_security_from_envresponse_helpers)AsyncStreamStream)unmarshal_json_response    N)AnyListLiteralMappingOptionalUnioncastoverloadc            /       j   e Zd Zed             Zed             Zeddddddeej	        ej
        f         deeeef                  deeeef                  deeeef                  d	eeeej        f                  d
eej        eej                 f         fd            Zedddddddddddddddddddddee         dej        deed         df         dedededeej                 deej                 dededej        dej        dej        dej         dej!        dedej"        deeeef                  deeeef                  deeeef                  d	eeeej        f                  d
ej        f,d             Zeddddddddddddddddddd!dee         dej        ded"         dedededeej                 deej                 dededej        dej        dej        dej         dej!        dedej"        deeeef                  deeeef                  deeeef                  d	eeeej        f                  d
eej                 f,d#            Zeddddddddddddddddddd$dee         d%ej#        deed         df         dedededeej                 deej                 dededej        dej        dej$        dej%        d&ej&        dej"        deeeef                  deeeef                  deeeef                  d	eeeej        f                  d
ej        f*d'            Zedddddddddddddddddd(dee         d%ej#        ded"         dedededeej                 deej                 dededej        dej        dej$        dej%        d&ej&        dej"        deeeef                  deeeef                  deeeef                  d	eeeej        f                  d
eej                 f*d)            Zee'e'ddddd*de(eej	        ej
        f                  de(e         deeeef                  deeeef                  deeeef                  d	eeeej        f                  d+ed
eej        eej                 f         fd,            Ze'e'ddddd*de(eej	        ej
        f                  de(e         deeeef                  deeeef                  deeeef                  d	eeeej        f                  d+ed
eej        eej                 f         fd-Zedddddddd.d/edeed         df         d0ee         d1ee         dee         deeeef                  deeeef                  d	eeeej        f                  d
ej        fd2            Z)eddddddd3d/eded"         d0ee         d1ee         dee         deeeef                  deeeef                  d	eeeej        f                  d
eej                 fd4            Z)eddddddd3d/eded0ee         d1ee         dee         deeeef                  deeeef                  d	eeeej        f                  d
eej        eej                 f         fd5            Z)dddddddd.d/edee         d0ee         d1ee         dee         deeeef                  deeeef                  d	eeeej        f                  d
eej        eej                 f         fd6Z)ddddd7d/edee         deeeef                  deeeef                  d	eeeej        f                  f
d8Z*ddddd7d/edee         deeeef                  deeeef                  d	eeeej        f                  d
ej        fd9Z+dS ):Interactionsc                      t          |           S N)InteractionsWithRawResponseselfs    c/var/www/app.qaans.com/backend/venv/lib/python3.11/site-packages/google/genai/_gaos/interactions.pywith_raw_responsezInteractions.with_raw_response   s    *4000    c                      t          |           S r!   )!InteractionsWithStreamingResponser#   s    r%   with_streaming_responsez$Interactions.with_streaming_response#   s    0666r'   Nextra_headersextra_query
extra_bodytimeoutrequestr,   r-   r.   r/   returnc                    dS a  Creating an interaction

        Creates a new interaction.

        :param body: The request body.
        :param api_version: Which version of the API to use.
        :param extra_headers: Additional headers to set or replace on requests.
        :param extra_query: Additional query parameters to append to requests.
        :param extra_body: Additional JSON object fields to merge into request bodies.
        :param timeout: Override the default request timeout configuration for this method in seconds
        N r$   r0   r,   r-   r.   r/   s         r%   createzInteractions.create'         r'   .api_versionstreamstore
backgroundsystem_instructiontoolsresponse_modalitiesresponse_mime_typeprevious_interaction_idservice_tierwebhook_configresponse_formatenvironmentgeneration_configcached_contentr,   r-   r.   r/   r9   modelr:   Fr;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   inputc                    dS a	  Creating an interaction

        Creates a new interaction.

        :param api_version: Which version of the API to use.
        :param model: The model that will complete your prompt.\n\nSee [models](https://ai.google.dev/gemini-api/docs/models) for additional details.
        :param stream: Input only. Whether the interaction will be streamed.
        :param store: Input only. Whether to store the response and request for later retrieval.
        :param background: Input only. Whether to run the model interaction in the background.
        :param system_instruction: System instruction for the interaction.
        :param tools: A list of tool declarations the model may call during interaction.
        :param response_modalities: The requested modalities of the response (TEXT, IMAGE, AUDIO).
        :param response_mime_type: The mime type of the response. This is required if response_format is set.
        :param previous_interaction_id: The ID of the previous interaction, if any.
        :param service_tier:
        :param webhook_config: Message for configuring webhook events for a request.
        :param response_format: Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.
        :param environment: The environment configuration for the interaction. Can be an object specifying remote environment sources or a string referencing an existing environment ID.
        :param generation_config: Configuration parameters for model interactions.
        :param cached_content: The name of the cached content used as context to serve the prediction.
            Note: only used in explicit caching, where users can have control over
            caching (e.g. what content to cache) and enjoy guaranteed cost savings.
            Format:
            `projects/{project}/locations/{location}/cachedContents/{cachedContent}`
        :param input: The input for the interaction.
        :param extra_headers: Additional headers to set or replace on requests.
        :param extra_query: Additional query parameters to append to requests.
        :param extra_body: Additional JSON object fields to merge into request bodies.
        :param timeout: Override the default request timeout configuration for this method in seconds
        Nr4   r$   r9   rH   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rI   r,   r-   r.   r/   s                         r%   r6   zInteractions.create?   r7   r'   r9   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   r,   r-   r.   r/   Tc                    dS rK   r4   rL   s                         r%   r6   zInteractions.createx   r7   r'   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   agent_configr,   r-   r.   r/   agentrP   c                    dS a*  Creating an interaction

        Creates a new interaction.

        :param api_version: Which version of the API to use.
        :param agent: The agent to interact with.
        :param stream: Input only. Whether the interaction will be streamed.
        :param store: Input only. Whether to store the response and request for later retrieval.
        :param background: Input only. Whether to run the model interaction in the background.
        :param system_instruction: System instruction for the interaction.
        :param tools: A list of tool declarations the model may call during interaction.
        :param response_modalities: The requested modalities of the response (TEXT, IMAGE, AUDIO).
        :param response_mime_type: The mime type of the response. This is required if response_format is set.
        :param previous_interaction_id: The ID of the previous interaction, if any.
        :param service_tier:
        :param webhook_config: Message for configuring webhook events for a request.
        :param response_format: Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.
        :param environment: The environment configuration for the interaction. Can be an object specifying remote environment sources or a string referencing an existing environment ID.
        :param agent_config: Configuration parameters for the agent interaction.
        :param input: The input for the interaction.
        :param extra_headers: Additional headers to set or replace on requests.
        :param extra_query: Additional query parameters to append to requests.
        :param extra_body: Additional JSON object fields to merge into request bodies.
        :param timeout: Override the default request timeout configuration for this method in seconds
        Nr4   r$   r9   rQ   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rP   rI   r,   r-   r.   r/   s                        r%   r6   zInteractions.create   r7   r'   r9   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rP   r,   r-   r.   r/   c                    dS rS   r4   rT   s                        r%   r6   zInteractions.create   r7   r'   r0   r9   r,   r-   r.   r/   body_kwargsc                    dS 	  Creating an interaction

        Creates a new interaction.

        :param api_version: Which version of the API to use.
        :param model: The model that will complete your prompt.\n\nSee [models](https://ai.google.dev/gemini-api/docs/models) for additional details.
        :param stream: Input only. Whether the interaction will be streamed.
        :param store: Input only. Whether to store the response and request for later retrieval.
        :param background: Input only. Whether to run the model interaction in the background.
        :param system_instruction: System instruction for the interaction.
        :param tools: A list of tool declarations the model may call during interaction.
        :param response_modalities: The requested modalities of the response (TEXT, IMAGE, AUDIO).
        :param response_mime_type: The mime type of the response. This is required if response_format is set.
        :param previous_interaction_id: The ID of the previous interaction, if any.
        :param service_tier:
        :param webhook_config: Message for configuring webhook events for a request.
        :param response_format: Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.
        :param environment: The environment configuration for the interaction. Can be an object specifying remote environment sources or a string referencing an existing environment ID.
        :param generation_config: Configuration parameters for model interactions.
        :param cached_content: The name of the cached content used as context to serve the prediction.
            Note: only used in explicit caching, where users can have control over
            caching (e.g. what content to cache) and enjoy guaranteed cost savings.
            Format:
            `projects/{project}/locations/{location}/cachedContents/{cachedContent}`
        :param input: The input for the interaction.
        :param agent: The agent to interact with.
        :param agent_config: Configuration parameters for the agent interaction.
        :param extra_headers: Additional headers to set or replace on requests.
        :param extra_query: Additional query parameters to append to requests.
        :param extra_body: Additional JSON object fields to merge into request bodies.
        :param timeout: Override the default request timeout configuration for this method in seconds
        Nr4   r$   r0   r9   r,   r-   r.   r/   rX   s           r%   r6   zInteractions.create  r7   r'   c                    d|v rd|v rt          d          d|v rd|v rt          d          d|v rd|v rt          d          d|v rd|v rt          d          d	|v rd|v rt          d
          d	|v rd|v rt          d          d}d}	t          }
d}|}                     |          }| j        j        }||}n                     ||	          }t          urbt          t          j        t          t                    rn1t          j        t          t                    t          j                            nt          |          }d |                                D             }d|i}d |                                D             }||d<   t          t          j        t          j        |t          j                            t!          j        |          \  }}                     dd||	ddddt'          t'          dd          dd          du rdnd||t          j         j        j        j                   j        j        fdd|          }|
t          k    rM j        j        t          ur j        j        }
n-t          j        dt          j        dddd           dd!"          }
d}t          |
t          j                  r|
g d#f} fd$}t7           j        |pd%d&dt9           j        j        t:          j                  t?          |d'(          )          }                      ||d* t'          t'          dd          dd          du p|d+k    |,          }|d-k    r|d+k    rt           j!        nt           j"        }t          t           |||t'          t'          dd          dd          du rd.nd/ tG          |           j        j$        %                    d0          1                    S 	  ||          S # tL          $ r?}t!          j'         j        j$        d0         tG          |          ||           Y d}~dS d}~ww xY w)2r[   rH   rQ   'Cannot supply both 'model' and 'agent'.rP   .Cannot supply both 'model' and 'agent_config'.rF   3Cannot supply both 'generation_config' and 'agent'.:Cannot supply both 'generation_config' and 'agent_config'.rG   0Cannot supply both 'cached_content' and 'agent'.7Cannot supply both 'cached_content' and 'agent_config'.Nc                 ,    i | ]\  }}|t           u||S r4   r   .0kvs      r%   
<dictcomp>z'Interactions.create.<locals>.<dictcomp>  #    TTTTQQe^^Aq^^^r'   r9   c                 ,    i | ]\  }}|t           u||S r4   re   rf   s      r%   rj   z'Interactions.create.<locals>.<dictcomp>  *       AAUNN1NNNr'   bodyPOST/{api_version}/interactionsT
user-agentr:   Ftext/event-streamapplication/jsonr9   c                  V    t          j        j        dddt          j                   S NFjson)r.   r   serialize_request_bodyrn   r   CreateInteractionRequestBodyr.   r0   s   r%   <lambda>z%Interactions.create.<locals>.<lambda>  0    (D3%) ) ) r'   methodpathbase_urlurl_variablesr0   request_body_requiredrequest_has_path_paramsrequest_has_query_paramsuser_agent_headeraccept_header_valuehttp_headersextra_query_params_globalssecurityget_serialized_bodyallow_empty_value
timeout_msattempt-count-backoff  @     0u     max_retries4084094295XXc                 f   d }t          j        | dd          r1t          j        |           }t          t          j        | |d          S t          j        | dd          rt          | d d          S t          j        | d	d          rtt          j        |           }	 t          t          j        | |          }t          j	        || |          # t          j
        $ r}t          j        d
| |          |d }~ww xY wt          j        | dd          rtt          j        |           }	 t          t          j        | |          }t          j        || |          # t          j
        $ r}t          j        d
| |          |d }~ww xY wt          j        |           }t          j        d| |          )N200rs   Fvalidaterr   c                 J    t          j        | t          j                  j        S r!   r   unmarshal_jsonr   InteractionSSEStreamEventdataraws    r%   r|   zHInteractions.create.<locals>._speakeasy_parse_response.<locals>.<lambda>  !     4\C! ! r'   [DONE]sentinel
client_ref4XX1Error response body did not match expected schemar   Unexpected response received)r   match_responsestream_to_textr   r   Interactionr   r    CreateInteractionClientErrorDataCreateInteractionClientErrorResponseValidationErrorGenAiDefaultError CreateInteractionServerErrorDataCreateInteractionServerErrorhttp_resresponse_datahttp_res_texter$   s       r%   _speakeasy_parse_responsez6Interactions.create.<locals>._speakeasy_parse_response  s"   !%M#He5GHH  % 4X > >. ,hPU    #He5HII   &#    #He5GHH  % 4X > >$;?=% %M !=%x   5    2K %  	 #He5GHH  % 4X > >$;?=% %M !=%x   5    2K %  	 "0::M*.-  0    1C C< C77C<*1E F*FF CreateInteractionsyncmode	executionconfigr   operation_idoauth2_scopessecurity_sourceresponsec                 0    t          j        ddg|           S Nr   r   r   match_status_codescs    r%   r|   z%Interactions.create.<locals>.<lambda>      5+CUENTU+V+V r'   	streaminghook_ctxr0   is_error_status_coder:   retry_configparsedevent_streambuffered_hooksr   parserr   r   r   hooks)(
ValueErrorr   _coerce_timeout_mssdk_configurationr   _get_urlr   r   CreateInteractionRequest
isinstancer   r   	unmarshalr   dictitemsr   consume_response_mode_build_requestgetattrCreateInteractionGlobalsglobalsr9   r   r   RetryConfigBackoffStrategyr   r   r   Securityr	   
do_requestStreamedAPIResponseAPIResponser   __dict__get	Exceptionraise_parse_errorr$   r0   r9   r,   r-   r.   r/   rX   r   r   retries
server_urlr   r   _body_kwargs_request_kwargs_speakeasy_response_modereqr   r   _speakeasy_hook_ctxr   _speakeasy_response_cls
parse_exc_s   ``   `                  r%   r6   zInteractions.createF  s   Z k!!g&<&<FGGGk!!n&C&CMNNN+--'[2H2HRSSS+--.K2O2OL   {**w+/E/EOPPP{**~/L/LVWWW7<
$,,W55
/:J!!HH}}X}==H%/gy11_g&&(G 	 GG  ,,LTT\-?-?-A-ATTTL/<k.JO !0!6!6!8!8  O '3OF#/1PQQ G
 2B1W2
 2
. , !!.'"&$(%)*ww55xGG4OO !4 3#%*4 2:F   +4! ! ! ! ! #!9 " 
 
> e%2%??0=++)#tQ>> !	   gu011 	C#%A%A%ABL2	 2	 2	 2	 2	h *)^,1&/  %*BfUUU	
 	
 	
 ??(!V!V77FD998UKKtS 7';6% # 
 
 $x// ,{:: !44%1 $
 '' 4 #77FD#A#A8USS    ' (#34GHH09==hGG     	,,X666 	 	 	.&/9&':;;	        	s   
P 
Q4QQr:   last_event_idinclude_inputr9   r,   r-   r/   idr  r  c                    dS i  Retrieving an interaction

        Retrieves the full details of a single interaction based on its `Interaction.id`.

        :param id: The unique identifier of the interaction to retrieve.
        :param stream: If set to true, the generated content will be streamed incrementally.
        :param last_event_id: Optional. If set, resumes the interaction stream from the next chunk after the event marked by the event id. Can only be used if `stream` is true.
        :param include_input: If set to true, includes the input in the response.
        :param api_version: Which version of the API to use.
        :param extra_headers: Additional headers to set or replace on requests.
        :param extra_query: Additional query parameters to append to requests.
        :param timeout: Override the default request timeout configuration for this method in seconds
        Nr4   	r$   r  r:   r  r  r9   r,   r-   r/   s	            r%   r   zInteractions.get<  r7   r'   r  r  r9   r,   r-   r/   c                    dS r  r4   r  s	            r%   r   zInteractions.getW  r7   r'   c                    dS r  r4   r  s	            r%   r   zInteractions.getr  r7   r'   c                *    d}	d}
t           }d}|}                     |          }| j        j        }||}	n                     |	|
          }	t          j        |||||          }t          j        |          \  }} 	                    dd|	|
|dddd|du rdnd	||t          j
         j        j        j        
           j        j        d|          }|t           k    rM j        j        t           ur j        j        }n-t          j        dt          j        dddd          dd          }d}t%          |t          j                  r|g df} fd}t'           j        |	pdddt)           j        j        t*          j                  t/          |d                    }                     ||d |du p|dk    |          }|dk    rr|dk    rt          j        nt          j        }t7          t8           ||||du rdnd t;          |           j        j                            d           !                    S 	  ||          S # t@          $ r?}t          j!         j        j        d          t;          |          ||           Y d}~dS d}~ww xY w)"r  Nr  r:   r  r  r9   GET /{api_version}/interactions/{id}FTrq   rr   rs   rt   r   r   r   r   r0   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   c                 f   d }t          j        | dd          r1t          j        |           }t          t          j        | |d          S t          j        | dd          rt          | d d          S t          j        | d	d          rtt          j        |           }	 t          t          j        | |          }t          j	        || |          # t          j
        $ r}t          j        d
| |          |d }~ww xY wt          j        | dd          rtt          j        |           }	 t          t          j        | |          }t          j        || |          # t          j
        $ r}t          j        d
| |          |d }~ww xY wt          j        |           }t          j        d| |          )Nr   rs   Fr   rr   c                 J    t          j        | t          j                  j        S r!   r   r   s    r%   r|   zEInteractions.get.<locals>._speakeasy_parse_response.<locals>.<lambda>  r   r'   r   r   r   r   r   r   )r   r   r   r   r   r   r   r   !GetInteractionByIDClientErrorDataGetInteractionByIDClientErrorr   r   !GetInteractionByIDServerErrorDataGetInteractionByIDServerErrorr   s       r%   r   z3Interactions.get.<locals>._speakeasy_parse_response  s&   !%M#He5GHH  % 4X > >. ,hPU    #He5HII   &#    #He5GHH  % 4X > >$;@ %% %M
 !>%x   5    2K %  	 #He5GHH  % 4X > >$;@ %% %M
 !>%x   5    2K %  	 "0::M*.-  r   r   getInteractionByIdr   r   r   c                 0    t          j        ddg|           S r   r   r   s    r%   r|   z"Interactions.get.<locals>.<lambda>*  r   r'   r   r   r   r   r   r   r   )"r   r   r   r   r   r   GetInteractionByIDRequestr   r   r   GetInteractionByIDGlobalsr   r9   r   r   r   r   r   r   r   r   r   r   r	   r   r   r   r   r   r   r   r   r   r   r$   r  r:   r  r  r9   r,   r-   r/   r   r   r   r   r   r   r0   r   r   r   r   r   r   r   r   s   `                       r%   r   zInteractions.get  s   2 7<
$,,W55
/:J!!HH}}X}==H2''#
 
 
 2B1W2
 2
. , !!3'"'$(%)*~~ !4 3#%*5 2:F   +4"!) " 
 
. e%2%??0=++)#tQ>> !	   gu011 	C#%A%A%ABL6	 6	 6	 6	 6	p *)^-1&/  %*BfUUU	
 	
 	
 ??(!V!VT>L%=%L% # 
 
 $x// ,{:: !44%1 $
 '' 4,2dNN..
#34GHH09==hGG  
 
 
	,,X666 	 	 	.&/9&':;;	        	s   >
I	 	
J4JJr9   r,   r-   r/   c                   d}d}t           }d}	|}
|                     |          }|| j        j        }|	|	}n|                     ||          }t          j        ||          }t          j        |
          \  }}
| 	                    dd|||ddddd|
|t          j
        | j        j        j        	          | j        j        d|
          }|t           k    rM| j        j        t           ur| j        j        }n-t          j        dt          j        dddd          dd          }d}t%          |t          j                  r|g df}d }t'          | j        |pdddt)          | j        j        t*          j                  t/          |d                    }|                     ||d |dk    |          }|dk    rl|dk    rt          j        nt          j        }t7          t8           |||d| t;          |          | j        j                            d                              S 	  ||          S # t@          $ r?}t          j!        | j        j        d         t;          |          ||           Y d}~dS d}~ww xY w)   Deleting an interaction

        Deletes the interaction by id.

        :param id: The unique identifier of the interaction to delete.
        :param api_version: Which version of the API to use.
        :param extra_headers: Additional headers to set or replace on requests.
        :param extra_query: Additional query parameters to append to requests.
        :param timeout: Override the default request timeout configuration for this method in seconds
        Nr  r9   DELETEr  FTrq   rs   rt   r  r   r   r   r   r   r   r   r   c                 D   d }t          j        | dd          rd S t          j        | dd          rc	 t          t          j        |           }t          j        ||           # t          j        $ r!}t          j        d| | j                  |d }~ww xY wt          j        | dd          rc	 t          t          j	        |           }t          j
        ||           # t          j        $ r!}t          j        d| | j                  |d }~ww xY wt          j        d|           Nr   *r   rs   r   r   r   r   r   r   r    DeleteInteractionClientErrorDataDeleteInteractionClientErrorr   r   text DeleteInteractionServerErrorDataDeleteInteractionServerErrorr   r   r   s      r%   r   z6Interactions.delete.<locals>._speakeasy_parse_response  s[   !%M#HeS99 #He5GHH 
$;?% %M !=mXVVV5    2K    	 #He5GHH 
$;?% %M !=mXVVV5    2K    	 *+I8TTTs/   /A! !B0BB+/C D
)DD
r   deleteInteractionr   r   r   c                 0    t          j        ddg|           S r   r   r   s    r%   r|   z%Interactions.delete.<locals>.<lambda>  r   r'   r   r   r   r   r   r   )"r   r   r   r   r   r   DeleteInteractionRequestr   r   r   DeleteInteractionGlobalsr   r9   r   r   r   r   r   r   r   r   r   r   r	   r   r   r   r   r   r   r   r   r   r   r$   r  r9   r,   r-   r/   r   r   r   r   r   r   r0   r   r   r   r   r   r   r   r   s                        r%   deletezInteractions.deleteI  sH   & 7<
$,,W55
/:J!!HH}}X}==H1#
 
 

 2B1W2
 2
. , !!3'"'$(%)* 2%*4 2:F   +4"!% " 
 
* e%2%??0=++)#tQ>> !	   gu011 	C#%A%A%ABL	U 	U 	U> *)^,1&/  %*BfUUU	
 	
 	
 ??(!V!V+{:% # 
 
 $x// ,{:: !44%1 $
 '' 4##34GHH09==hGG  
 
 
	,,X666 	 	 	.&/9&':;;	        	   (
H3 3
I<=4I77I<c                   d}d}t           }d}	|}
|                     |          }|| j        j        }|	|	}n|                     ||          }t          j        ||          }t          j        |
          \  }}
| 	                    dd|||ddddd|
|t          j
        | j        j        j        	          | j        j        d|
          }|t           k    rM| j        j        t           ur| j        j        }n-t          j        dt          j        dddd          dd          }d}t%          |t          j                  r|g df}d }t'          | j        |pdddt)          | j        j        t*          j                  t/          |d                    }|                     ||d |dk    |          }|dk    rl|dk    rt          j        nt          j        }t7          t8           |||d| t;          |          | j        j                            d                              S 	  ||          S # t@          $ r?}t          j!        | j        j        d         t;          |          ||           Y d}~dS d}~ww xY w)   Canceling an interaction

        Cancels an interaction by id. This only applies to background interactions that are still running.

        :param id: The unique identifier of the interaction to cancel.
        :param api_version: Which version of the API to use.
        :param extra_headers: Additional headers to set or replace on requests.
        :param extra_query: Additional query parameters to append to requests.
        :param timeout: Override the default request timeout configuration for this method in seconds
        Nr  ro   '/{api_version}/interactions/{id}/cancelFTrq   rs   rt   r  r   r   r   r   r   r   r   r   c                 x   d }t          j        | dd          rt          t          j        | d          S t          j        | dd          rc	 t          t
          j        |           }t          j        ||           # t
          j        $ r!}t          j	        d| | j
                  |d }~ww xY wt          j        | dd          rc	 t          t
          j        |           }t          j        ||           # t
          j        $ r!}t          j	        d| | j
                  |d }~ww xY wt          j	        d|           	Nr   rs   Fr   r   r   r   r   r   r   r   r   r   r   $CancelInteractionByIDClientErrorData CancelInteractionByIDClientErrorr   r   r&  $CancelInteractionByIDServerErrorData CancelInteractionByIDServerErrorr)  s      r%   r   z6Interactions.cancel.<locals>._speakeasy_parse_response.  s   !%M#He5GHH . ,h    #He5GHH $;CX% %M !A%x   5    2K    	 #He5GHH $;CX% %M !A%x   5    2K    	 *+I8TTTs0   /A; ;B+
B&&B+/C4 4D$DD$r   cancelInteractionByIdr   r   r   c                 0    t          j        ddg|           S r   r   r   s    r%   r|   z%Interactions.cancel.<locals>.<lambda>`  r   r'   r   r   r   r   r   r   )"r   r   r   r   r   r   CancelInteractionByIDRequestr   r   r   CancelInteractionByIDGlobalsr   r9   r   r   r   r   r   r   r   r   r   r   r	   r   r   r   r   r   r   r   r   r   r   r.  s                        r%   cancelzInteractions.cancel  sI   & 7<
$,,W55
/:J!!HH}}X}==H5#
 
 

 2B1W2
 2
. , !!:'"'$(%)* 2%*8 2:F   +4"!% " 
 
* e%2%??0=++)#tQ>> !	   gu011 	C#%A%A%ABL#	U #	U #	UJ *)^01&/  %*BfUUU	
 	
 	
 ??(!V!V+{:% # 
 
 $x// ,{:: !44%1 $
 '' 4##34GHH09==hGG  
 
 
	,,X666 	 	 	.&/9&':;;	        	r0  ),__name__
__module____qualname__propertyr&   r*   r   r   r   r   CreateInteractionRequestParamr   r   strr   floathttpxTimeoutr   r   r   InteractionSSEEventr6   Modelr   boolr   	ToolParamResponseModalityServiceTierWebhookConfigParam)CreateModelInteractionResponseFormatParam&CreateModelInteractionEnvironmentParamGenerationConfigParamInteractionsInputParamAgentOption)CreateAgentInteractionResponseFormatParam&CreateAgentInteractionEnvironmentParam&CreateAgentInteractionAgentConfigParamr   r   r   r/  r?  r4   r'   r%   r   r      s       1 1 X1 7 7 X7  6:37269=   +V-QQ
  S 12 gc3h/0 WS#X./ %u} 456 
|'0P)QQ	R   X.  &*.2"%.1CF"%'*14:=RUKN@C!5937269=/6 6 6 c]6 !	6
 gend*+6 6 6  6 L*+6 ","?@6  6 "%6 #.6 %76 &O6  "H!6" (=#6$ %6& 2'6(  S 12)6* gc3h/0+6, WS#X./-6. %u} 456/60 
	!16 6 6 X6p  &* "%.1CF"%'*14:=RUKN@C!5937269=/6 6 6 c]6 !	6
 6 6 6  6 L*+6 ","?@6  6 "%6 #.6 %76 &O6  "H!6" (=#6$ %6& 2'6(  S 12)6* gc3h/0+6, WS#X./-6. %u} 456/60 
0	116 6 6 X6p  &*.2"%.1CF"%'*14:=RUKNLO5937269=-0 0 0 c]0 '	0
 gend*+0 0 0  0 L*+0 ","?@0  0 "%0 #.0 %70 &O0  "H!0" #I#0$ 2%0&  S 12'0( gc3h/0)0* WS#X./+0, %u} 456-0. 
	!/0 0 0 X0d  &* "%.1CF"%'*14:=RUKNLO5937269=-0 0 0 c]0 '	0
 0 0 0  0 L*+0 ","?@0  0 "%0 #.0 %70 &O0  "H!0" #I#0$ 2%0&  S 12'0( gc3h/0)0* WS#X./+0, %u} 456-0. 
0	1/0 0 0 X0d  -25937269=, , , "&163WWX
, &c*,  S 12, gc3h/0, WS#X./, %u} 456, , 
|'0P)QQ	R, , , X,f -25937269=t t t "&163WWX
t &c*t  S 12t gc3h/0t WS#X./t %u} 456t t 
|'0P)QQ	Rt t t tl 
 /3'+(-%)59379=   gend*+	
  }  ~ c]  S 12 gc3h/0 %u} 456 
	!   X4  (,(-%)59379=   	
  }  ~ c]  S 12 gc3h/0 %u} 456 
0	1   X4  (,(-%)59379=   	
  }  ~ c]  S 12 gc3h/0 %u} 456 
|'0P)QQ	R   X< "''+(-%)59379=z z zz 	z
  }z  ~z c]z  S 12z gc3h/0z %u} 456z 
|'0P)QQ	Rz z z z@ &*59379=V V VV c]	V
  S 12V gc3h/0V %u} 456V V V Vx &*59379=\ \ \\ c]	\
  S 12\ gc3h/0\ %u} 456\ 
	!\ \ \ \ \ \r'   r   c                       e Zd ZdeddfdZdS )r"   sdkr1   Nc                    || _         t          j        |j        d          | _        t          j        |j        d          | _        t          j        |j        d          | _        t          j        |j        d          | _        d S Nr,   )_sdkr   to_raw_response_wrapperr6   r   r/  r?  r$   rY  s     r%   __init__z$InteractionsWithRawResponse.__init__  sx    	&>J
 
 $;CG_UU&>J
 
 '>J
 
r'   r@  rA  rB  r   r_  r4   r'   r%   r"   r"     s6        
L 
T 
 
 
 
 
 
r'   r"   c                       e Zd ZdeddfdZdS )r)   rY  r1   Nc                    || _         t          j        |j        d          | _        t          j        |j        d          | _        t          j        |j        d          | _        t          j        |j        d          | _        d S r[  )r\  r   to_streamed_response_wrapperr6   r   r/  r?  r^  s     r%   r_  z*InteractionsWithStreamingResponse.__init__  s    	&CJ
 
 $@G_
 
 'CJ
 
 'CJ
 
r'   r`  r4   r'   r%   r)   r)     s6        
L 
T 
 
 
 
 
 
r'   r)   c            /       j   e Zd Zed             Zed             Zeddddddeej	        ej
        f         deeeef                  deeeef                  deeeef                  d	eeeej        f                  d
eej        eej                 f         fd            Zedddddddddddddddddddddee         dej        deed         df         dedededeej                 deej                 dededej        dej        dej        dej         dej!        dedej"        deeeef                  deeeef                  deeeef                  d	eeeej        f                  d
ej        f,d             Zeddddddddddddddddddd!dee         dej        ded"         dedededeej                 deej                 dededej        dej        dej        dej         dej!        dedej"        deeeef                  deeeef                  deeeef                  d	eeeej        f                  d
eej                 f,d#            Zeddddddddddddddddddd$dee         d%ej#        deed         df         dedededeej                 deej                 dededej        dej        dej$        dej%        d&ej&        dej"        deeeef                  deeeef                  deeeef                  d	eeeej        f                  d
ej        f*d'            Zedddddddddddddddddd(dee         d%ej#        ded"         dedededeej                 deej                 dededej        dej        dej$        dej%        d&ej&        dej"        deeeef                  deeeef                  deeeef                  d	eeeej        f                  d
eej                 f*d)            Zee'e'ddddd*de(eej	        ej
        f                  de(e         deeeef                  deeeef                  deeeef                  d	eeeej        f                  d+ed
eej        eej                 f         fd,            Ze'e'ddddd*de(eej	        ej
        f                  de(e         deeeef                  deeeef                  deeeef                  d	eeeej        f                  d+ed
eej        eej                 f         fd-Zedddddddd.d/edeed         df         d0ee         d1ee         dee         deeeef                  deeeef                  d	eeeej        f                  d
ej        fd2            Z)eddddddd3d/eded"         d0ee         d1ee         dee         deeeef                  deeeef                  d	eeeej        f                  d
eej                 fd4            Z)eddddddd3d/eded0ee         d1ee         dee         deeeef                  deeeef                  d	eeeej        f                  d
eej        eej                 f         fd5            Z)dddddddd.d/edee         d0ee         d1ee         dee         deeeef                  deeeef                  d	eeeej        f                  d
eej        eej                 f         fd6Z)ddddd7d/edee         deeeef                  deeeef                  d	eeeej        f                  f
d8Z*ddddd7d/edee         deeeef                  deeeef                  d	eeeej        f                  d
ej        fd9Z+dS ):AsyncInteractionsc                      t          |           S r!   ) AsyncInteractionsWithRawResponser#   s    r%   r&   z#AsyncInteractions.with_raw_response  s    /555r'   c                      t          |           S r!   )&AsyncInteractionsWithStreamingResponser#   s    r%   r*   z)AsyncInteractions.with_streaming_response  s    5d;;;r'   Nr+   r0   r,   r-   r.   r/   r1   c                
   K   dS r3   r4   r5   s         r%   r6   zAsyncInteractions.create  
        r'   .r8   r9   rH   r:   Fr;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rI   c                
   K   dS rK   r4   rL   s                         r%   r6   zAsyncInteractions.create  rk  r'   rM   Tc                
   K   dS rK   r4   rL   s                         r%   r6   zAsyncInteractions.create  rk  r'   rO   rQ   rP   c                
   K   dS rS   r4   rT   s                        r%   r6   zAsyncInteractions.create3  rk  r'   rU   c                
   K   dS rS   r4   rT   s                        r%   r6   zAsyncInteractions.createf  rk  r'   rW   rX   c                
   K   dS rZ   r4   r\   s           r%   r6   zAsyncInteractions.create  rk  r'   c                t	   K   d|v rd|v rt          d          d|v rd|v rt          d          d|v rd|v rt          d          d|v rd|v rt          d          d	|v rd|v rt          d
          d	|v rd|v rt          d          d}d}	t          }
d}|}                     |          }| j        j        }||}n                     ||	          }t          urbt          t          j        t          t                    rn1t          j        t          t                    t          j                            nt          |          }d |                                D             }d|i}d |                                D             }||d<   t          t          j        t          j        |t          j                            t!          j        |          \  }}                     dd||	ddddt'          t'          dd          dd          du rdnd||t          j         j        j        j                   j        j        fdd|          }|
t          k    rM j        j        t          ur j        j        }
n-t          j        dt          j        dddd           dd!"          }
d}t          |
t          j                  r|
g d#f} fd$}t7           j        |pd%d&dt9           j        j        t:          j                  t?          |d'(          )          }                      ||d* t'          t'          dd          dd          du p|d+k    |,           d{V }|d-k    r|d+k    rt           j!        nt           j"        }t          t           |||t'          t'          dd          dd          du rd.nd/ tG          |           j        j$        %                    d0           j        j$        %                    d1          2                    S 	  ||           d{V S # tL          $ rp}t!          j'         j        j$        %                    d1           j        j$        %                    d0          tG          |          ||           d{V  Y d}~dS d}~ww xY w)3r[   rH   rQ   r^   rP   r_   rF   r`   ra   rG   rb   rc   Nc                 ,    i | ]\  }}|t           u||S r4   re   rf   s      r%   rj   z,AsyncInteractions.create.<locals>.<dictcomp>  rk   r'   r9   c                 ,    i | ]\  }}|t           u||S r4   re   rf   s      r%   rj   z,AsyncInteractions.create.<locals>.<dictcomp>  rm   r'   rn   ro   rp   Trq   r:   Frr   rs   rt   c                  V    t          j        j        dddt          j                   S rv   rx   r{   s   r%   r|   z*AsyncInteractions.create.<locals>.<lambda>=  r}   r'   r~   r   r   r   r   r   r   r   r   c                   K   d }t          j        | dd          r7t          j        |            d {V }t          t          j        | |d          S t          j        | dd          rt          | d d          S t          j        | d	d          rzt          j        |            d {V }	 t          t          j        | |          }t          j	        || |          # t          j
        $ r}t          j        d
| |          |d }~ww xY wt          j        | dd          rzt          j        |            d {V }	 t          t          j        | |          }t          j        || |          # t          j
        $ r}t          j        d
| |          |d }~ww xY wt          j        |            d {V }t          j        d| |          )Nr   rs   Fr   rr   c                 J    t          j        | t          j                  j        S r!   r   r   s    r%   r|   zMAsyncInteractions.create.<locals>._speakeasy_parse_response.<locals>.<lambda>b  r   r'   r   r   r   r   r   r   )r   r   stream_to_text_asyncr   r   r   r   r   r   r   r   r   r   r   r   s       r%   r   z;AsyncInteractions.create.<locals>._speakeasy_parse_responseX  sn     !%M#He5GHH &+&@&J&J J J J J J J. ,hPU    #He5HII "  &#    #He5GHH &+&@&J&J J J J J J J$;?=% %M !=%x   5    2K %  	 #He5GHH &+&@&J&J J J J J J J$;?=% %M !=%x   5    2K %  	 #("<X"F"FFFFFFFM*.-  0   .1C D
.DD
>1E/ /F>FFr   r   asyncr   r   c                 0    t          j        ddg|           S r   r   r   s    r%   r|   z*AsyncInteractions.create.<locals>.<lambda>  r   r'   r   r   r   r   r   r   _async_hooksr   r   r   r   r   r   async_hooks)(r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   _build_request_asyncr   r   r   r9   r   r   r   r   r   r   r   r   r	   do_request_asyncAsyncStreamedAPIResponseAsyncAPIResponser   r   r   r   raise_parse_error_asyncr   s   ``   `                  r%   r6   zAsyncInteractions.create  s.     Z k!!g&<&<FGGGk!!n&C&CMNNN+--'[2H2HRSSS+--.K2O2OL   {**w+/E/EOPPP{**~/L/LVWWW7<
$,,W55
/:J!!HH}}X}==H%/gy11_g&&(G 	 GG  ,,LTT\-?-?-A-ATTTL/<k.JO !0!6!6!8!8  O '3OF#/1PQQ G
 2B1W2
 2
. , ''.'"&$(%)*ww55xGG4OO !4 3#%*4 2:F   +4! ! ! ! ! #!9 ( 
 
> e%2%??0=++)#tQ>> !	   gu011 	C#%A%A%ABL2	 2	 2	 2	 2	h *)^,1&/  %*BgVVV	
 	
 	
 ..(!V!V77FD998UKKtS 7';6% / 
 
 
 
 
 
 
 
 $x// ,{:: !99%6 $
 '' 4 #77FD#A#A8USS    ' (#34GHH09==hGG $ 6 ? C CN S S    "		228<<<<<<<<< 	 	 	":&/33NCC&/33H==&':;;              	s   ,P= =
R7A%R22R7r   r  r  r  c                
   K   dS r  r4   r  s	            r%   r   zAsyncInteractions.get  rk  r'   r  c                
   K   dS r  r4   r  s	            r%   r   zAsyncInteractions.get  rk  r'   c                
   K   dS r  r4   r  s	            r%   r   zAsyncInteractions.get  rk  r'   c                   K   d}	d}
t           }d}|}                     |          }| j        j        }||}	n                     |	|
          }	t          j        |||||          }t          j        |          \  }} 	                    dd|	|
|dddd|du rdnd	||t          j
         j        j        j        
           j        j        d|          }|t           k    rM j        j        t           ur j        j        }n-t          j        dt          j        dddd          dd          }d}t%          |t          j                  r|g df} fd}t'           j        |	pdddt)           j        j        t*          j                  t/          |d                    }                     ||d |du p|dk    |           d{V }|dk    r|dk    rt          j        nt          j        }t7          t8           ||||du rdnd t;          |           j        j                            d            j        j                            d!          "                    S 	  ||           d{V S # t@          $ rp}t          j!         j        j                            d!           j        j                            d           t;          |          ||           d{V  Y d}~dS d}~ww xY w)#r  Nr  r  r  FTrq   rr   rs   rt   r  r   r   r   r   r   r   r   r   c                   K   d }t          j        | dd          r7t          j        |            d {V }t          t          j        | |d          S t          j        | dd          rt          | d d          S t          j        | d	d          rzt          j        |            d {V }	 t          t          j        | |          }t          j	        || |          # t          j
        $ r}t          j        d
| |          |d }~ww xY wt          j        | dd          rzt          j        |            d {V }	 t          t          j        | |          }t          j        || |          # t          j
        $ r}t          j        d
| |          |d }~ww xY wt          j        |            d {V }t          j        d| |          )Nr   rs   Fr   rr   c                 J    t          j        | t          j                  j        S r!   r   r   s    r%   r|   zJAsyncInteractions.get.<locals>._speakeasy_parse_response.<locals>.<lambda>s  r   r'   r   r   r   r   r   r   )r   r   rw  r   r   r   r   r   r  r  r   r   r  r  r   s       r%   r   z8AsyncInteractions.get.<locals>._speakeasy_parse_responsei  sr     !%M#He5GHH &+&@&J&J J J J J J J. ,hPU    #He5HII "  &#    #He5GHH &+&@&J&J J J J J J J$;@ %% %M
 !>%x   5    2K %  	 #He5GHH &+&@&J&J J J J J J J$;@ %% %M
 !>%x   5    2K %  	 #("<X"F"FFFFFFFM*.-  rx  r   r  ry  r   r   c                 0    t          j        ddg|           S r   r   r   s    r%   r|   z'AsyncInteractions.get.<locals>.<lambda>  r   r'   r   r   r   r   r   r   r{  r|  )"r   r   r   r   r   r   r  r   r   r~  r  r   r9   r   r   r   r   r   r   r   r   r   r   r	   r  r  r  r   r   r   r   r   r   r  r  s   `                       r%   r   zAsyncInteractions.get  s     2 7<
$,,W55
/:J!!HH}}X}==H2''#
 
 
 2B1W2
 2
. , ''3'"'$(%)*~~ !4 3#%*5 2:F   +4"!) ( 
 
. e%2%??0=++)#tQ>> !	   gu011 	C#%A%A%ABL6	 6	 6	 6	 6	p *)^-1&/  %*BgVVV	
 	
 	
 ..(!V!VT>L%=%L% / 
 
 
 
 
 
 
 
 $x// ,{:: !99%6 $
 '' 4,2dNN..
#34GHH09==hGG $ 6 ? C CN S S    		228<<<<<<<<< 	 	 	":&/33NCC&/33H==&':;;              	s   $I5 5
K/?A%K**K/r  c                  K   d}d}t           }d}	|}
|                     |          }|| j        j        }|	|	}n|                     ||          }t          j        ||          }t          j        |
          \  }}
| 	                    dd|||ddddd|
|t          j
        | j        j        j        	          | j        j        d|
          }|t           k    rM| j        j        t           ur| j        j        }n-t          j        dt          j        dddd          dd          }d}t%          |t          j                  r|g df}d }t'          | j        |pdddt)          | j        j        t*          j                  t/          |d                    }|                     ||d |dk    |           d{V }|dk    r|dk    rt          j        nt          j        }t7          t8           |||d| t;          |          | j        j                            d          | j        j                            d                               S 	  ||           d{V S # t@          $ rp}t          j!        | j        j                            d          | j        j                            d          t;          |          ||           d{V  Y d}~dS d}~ww xY w)!r  Nr  r  r  FTrq   rs   rt   r  r   r   r   r   r   r   r   r   c                 H  K   d }t          j        | dd          rd S t          j        | dd          rc	 t          t          j        |           }t          j        ||           # t          j        $ r!}t          j        d| | j                  |d }~ww xY wt          j        | dd          rc	 t          t          j	        |           }t          j
        ||           # t          j        $ r!}t          j        d| | j                  |d }~ww xY wt          j        d|           r!  r#  r)  s      r%   r   z;AsyncInteractions.delete.<locals>._speakeasy_parse_response  s_     !%M#HeS99 #He5GHH 
$;?% %M !=mXVVV5    2K    	 #He5GHH 
$;?% %M !=mXVVV5    2K    	 *+I8TTTs/   /A# #B2BB-/C D+DDr   r*  ry  r   r   c                 0    t          j        ddg|           S r   r   r   s    r%   r|   z*AsyncInteractions.delete.<locals>.<lambda>H  r   r'   r   r   r   r   r   r{  r|  )"r   r   r   r   r   r   r,  r   r   r~  r-  r   r9   r   r   r   r   r   r   r   r   r   r   r	   r  r  r  r   r   r   r   r   r   r  r.  s                        r%   r/  zAsyncInteractions.delete  s     & 7<
$,,W55
/:J!!HH}}X}==H1#
 
 

 2B1W2
 2
. , ''3'"'$(%)* 2%*4 2:F   +4"!% ( 
 
* e%2%??0=++)#tQ>> !	   gu011 	C#%A%A%ABL	U 	U 	U> *)^,1&/  %*BgVVV	
 	
 	
 ..(!V!V+{:% / 
 
 
 
 
 
 
 
 $x// ,{:: !99%6 $
 '' 4##34GHH09==hGG $ 6 ? C CN S S    		228<<<<<<<<< 	 	 	":&/33NCC&/33H==&':;;              	   I 
K)A%KKc                  K   d}d}t           }d}	|}
|                     |          }|| j        j        }|	|	}n|                     ||          }t          j        ||          }t          j        |
          \  }}
| 	                    dd|||ddddd|
|t          j
        | j        j        j        	          | j        j        d|
          }|t           k    rM| j        j        t           ur| j        j        }n-t          j        dt          j        dddd          dd          }d}t%          |t          j                  r|g df}d }t'          | j        |pdddt)          | j        j        t*          j                  t/          |d                    }|                     ||d |dk    |           d{V }|dk    r|dk    rt          j        nt          j        }t7          t8           |||d| t;          |          | j        j                            d          | j        j                            d                               S 	  ||           d{V S # t@          $ rp}t          j!        | j        j                            d          | j        j                            d          t;          |          ||           d{V  Y d}~dS d}~ww xY w)!r2  Nr  ro   r3  FTrq   rs   rt   r  r   r   r   r   r   r   r   r   c                 |  K   d }t          j        | dd          rt          t          j        | d          S t          j        | dd          rc	 t          t
          j        |           }t          j        ||           # t
          j        $ r!}t          j	        d| | j
                  |d }~ww xY wt          j        | dd          rc	 t          t
          j        |           }t          j        ||           # t
          j        $ r!}t          j	        d| | j
                  |d }~ww xY wt          j	        d|           r5  r6  r)  s      r%   r   z;AsyncInteractions.cancel.<locals>._speakeasy_parse_response  s     !%M#He5GHH . ,h    #He5GHH $;CX% %M !A%x   5    2K    	 #He5GHH $;CX% %M !A%x   5    2K    	 *+I8TTTs0   /A= =B-B((B-/C6 6D&D!!D&r   r;  ry  r   r   c                 0    t          j        ddg|           S r   r   r   s    r%   r|   z*AsyncInteractions.cancel.<locals>.<lambda>  r   r'   r   r   r   r   r   r{  r|  )"r   r   r   r   r   r   r=  r   r   r~  r>  r   r9   r   r   r   r   r   r   r   r   r   r   r	   r  r  r  r   r   r   r   r   r   r  r.  s                        r%   r?  zAsyncInteractions.canceli  s     & 7<
$,,W55
/:J!!HH}}X}==H5#
 
 

 2B1W2
 2
. , '':'"'$(%)* 2%*8 2:F   +4"!% ( 
 
* e%2%??0=++)#tQ>> !	   gu011 	C#%A%A%ABL#	U #	U #	UJ *)^01&/  %*BgVVV	
 	
 	
 ..(!V!V+{:% / 
 
 
 
 
 
 
 
 $x// ,{:: !99%6 $
 '' 4##34GHH09==hGG $ 6 ? C CN S S    		228<<<<<<<<< 	 	 	":&/33NCC&/33H==&':;;              	r  ),r@  rA  rB  rC  r&   r*   r   r   r   r   rD  r   r   rE  r   rF  rG  rH  r   r   r   rI  r6   rJ  r   rK  r   rL  rM  rN  rO  rP  rQ  rR  rS  rT  rU  rV  rW  r   r   r   r/  r?  r4   r'   r%   re  re    s       6 6 X6 < < X<  6:37269=   +V-QQ
  S 12 gc3h/0 WS#X./ %u} 456 
|'\5U)VV	W   X.  &*.2"%.1CF"%'*14:=RUKN@C!5937269=/6 6 6 c]6 !	6
 gend*+6 6 6  6 L*+6 ","?@6  6 "%6 #.6 %76 &O6  "H!6" (=#6$ %6& 2'6(  S 12)6* gc3h/0+6, WS#X./-6. %u} 456/60 
	!16 6 6 X6p  &* "%.1CF"%'*14:=RUKN@C!5937269=/6 6 6 c]6 !	6
 6 6 6  6 L*+6 ","?@6  6 "%6 #.6 %76 &O6  "H!6" (=#6$ %6& 2'6(  S 12)6* gc3h/0+6, WS#X./-6. %u} 456/60 
\5	616 6 6 X6p  &*.2"%.1CF"%'*14:=RUKNLO5937269=-0 0 0 c]0 '	0
 gend*+0 0 0  0 L*+0 ","?@0  0 "%0 #.0 %70 &O0  "H!0" #I#0$ 2%0&  S 12'0( gc3h/0)0* WS#X./+0, %u} 456-0. 
	!/0 0 0 X0d  &* "%.1CF"%'*14:=RUKNLO5937269=-0 0 0 c]0 '	0
 0 0 0  0 L*+0 ","?@0  0 "%0 #.0 %70 &O0  "H!0" #I#0$ 2%0&  S 12'0( gc3h/0)0* WS#X./+0, %u} 456-0. 
\5	6/0 0 0 X0d  -25937269=, , , "&163WWX
, &c*,  S 12, gc3h/0, WS#X./, %u} 456, , 
|'\5U)VV	W, , , X,f -25937269=v v v "&163WWX
v &c*v  S 12v gc3h/0v WS#X./v %u} 456v v 
|'\5U)VV	Wv v v vp 
 /3'+(-%)59379=   gend*+	
  }  ~ c]  S 12 gc3h/0 %u} 456 
	!   X4  (,(-%)59379=   	
  }  ~ c]  S 12 gc3h/0 %u} 456 
\5	6   X4  (,(-%)59379=   	
  }  ~ c]  S 12 gc3h/0 %u} 456 
|'\5U)VV	W   X< "''+(-%)59379=| | || 	|
  }|  ~| c]|  S 12| gc3h/0| %u} 456| 
|'\5U)VV	W| | | |D &*59379=X X XX c]	X
  S 12X gc3h/0X %u} 456X X X X| &*59379=^ ^ ^^ c]	^
  S 12^ gc3h/0^ %u} 456^ 
	!^ ^ ^ ^ ^ ^r'   re  c                       e Zd ZdeddfdZdS )rg  rY  r1   Nc                    || _         t          j        |j        d          | _        t          j        |j        d          | _        t          j        |j        d          | _        t          j        |j        d          | _        d S r[  )r\  r   async_to_raw_response_wrapperr6   r   r/  r?  r^  s     r%   r_  z)AsyncInteractionsWithRawResponse.__init__	  s    	&DJ
 
 $AG_
 
 'DJ
 
 'DJ
 
r'   r@  rA  rB  re  r_  r4   r'   r%   rg  rg  
	  7        
- 
$ 
 
 
 
 
 
r'   rg  c                       e Zd ZdeddfdZdS )ri  rY  r1   Nc                    || _         t          j        |j        d          | _        t          j        |j        d          | _        t          j        |j        d          | _        t          j        |j        d          | _        d S r[  )r\  r   "async_to_streamed_response_wrapperr6   r   r/  r?  r^  s     r%   r_  z/AsyncInteractionsWithStreamingResponse.__init__	  s    	&IJ
 
 $FG_
 
 'IJ
 
 'IJ
 
r'   r  r4   r'   r%   ri  ri  	  r  r'   ri  )(__doc__r   r   r   r   r   r   r   r   r	   basesdkr
   r   r   r   r   r   r   r   utils.eventstreamingr   r   utils.unmarshal_json_responser   rG  typingr   r   r   r   r   r   r   r   r   r"   r)   re  rg  ri  r4   r'   r%   <module>r     s#  " H G * * * * * * * * * * * * H H H H H H H H H H * * * * * * * * C C C C C C C C C C C C : : : : : : : : 5 5 5 5 5 5 5 5 B B B B B B  O O O O O O O O O O O O O O O O O O O O_ _ _ _ _7 _ _ _D#
 
 
 
 
 
 
 

 
 
 
 
 
 
 
"g g g g g g g gT#
 
 
 
 
 
 
 
"
 
 
 
 
 
 
 
 
 
r'   