
    UEj$                    4   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'y
)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            /       ~   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j6                     deej8                     dededej:                  dej<                  dej>                  dej@                  dejB                  dedejD                  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j6                     deej8                     dededej:                  dej<                  dej>                  dej@                  dejB                  dedejD                  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jF                  deed   df   dedededeej6                     deej8                     dededej:                  dej<                  dejH                  dejJ                  d&ejL                  dejD                  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jF                  ded"   dedededeej6                     deej8                     dededej:                  dej<                  dejH                  dejJ                  d&ejL                  dejD                  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+y):Interactionsc                     t        |       S N)InteractionsWithRawResponseselfs    U/var/www/html/qr/venv/lib/python3.12/site-packages/google/genai/_gaos/interactions.pywith_raw_responsezInteractions.with_raw_response   s    *400    c                     t        |       S r!   )!InteractionsWithStreamingResponser#   s    r%   with_streaming_responsez$Interactions.with_streaming_response#   s    066r'   Nextra_headersextra_query
extra_bodytimeoutrequestr,   r-   r.   r/   returnc                     y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                     y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                     y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                     y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                     yrS   r4   rT   s                        r%   r6   zInteractions.create   r7   r'   r0   r9   r,   r-   r.   r/   body_kwargsc                     y	  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                  j                  }||}n j                  ||	      }t        ur]t        t        j                  t        t              rn1t        j                  t        t              t        j                              nt        |      }|j                         D ci c]  \  }}|t        us|| }}}d|i}|j                         D ci c]  \  }}|t        us|| }}}||d<   t        t        j                  t        j                  |t        j                              t!        j"                  |      \  }} 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(  rb j                  j0                  t        ur j                  j0                  }
n/t        j2                  dt        j4                  dddd      dd       }
d}t        |
t        j2                        r|
g d!f} fd"}t7         j                  |xs d#d$dt9         j                  j.                  t:        j<                        t?        |d%&      '      } jA                  ||d( t'        t'        dd      dd      du xs |d)k(  |*      }|d+k7  r|d)k(  rt         jB                  nt         jD                  }t        t         |||t'        t'        dd      dd      du rd,nd- tG        |       j                  jH                  jK                  d.      /            S 	  ||      S c c}}w c c}}w # tL        $ rB}t!        jN                   j                  jH                  d.   tG        |      ||       Y d}~yd}~ww xY w)0r[   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'.Nr9   bodyPOST/{api_version}/interactionsT
user-agentr:   Ftext/event-streamapplication/jsonr9   c                  j    t        j                  j                  dddt        j                         S NFjson)r.   r   serialize_request_bodyrd   r   CreateInteractionRequestBodyr.   r0   s   r%   <lambda>z%Interactions.create.<locals>.<lambda>  .    (D(D3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                    d }t        j                  | dd      r2t        j                  |       }t        t        j
                  | |d      S t        j                  | dd      rt        | d d      S t        j                  | d	d      rHt        j                  |       }	 t        t        j                  | |      }t        j                  || |      t        j                  | dd      rHt        j                  |       }	 t        t        j                  | |      }t        j                  || |      t        j                  |       }t        j                  d| |      # t        j                  $ r}t        j                  d
| |      |d }~ww xY w# t        j                  $ r}t        j                  d
| |      |d }~ww xY w)N200ri   Fvalidaterh   c                 ^    t        j                  | t        j                        j                  S r!   r   unmarshal_jsonr   InteractionSSEStreamEventdataraws    r%   rr   zHInteractions.create.<locals>._speakeasy_parse_response.<locals>.<lambda>  $     4 4\CC!d 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 % 4 4X >. ,,hPU  ##He5HI &#  ##He5GH % 4 4X >$;??=%M !==%x  ##He5GH % 4 4X >$;??=%M !==%x  "00:M**.- / 55  22K % 	 55  22K % 	0   !2E  2F F1F		FG$F<<G CreateInteractionsyncmode	executionconfigrw   operation_idoauth2_scopessecurity_sourceresponsec                 2    t        j                  ddg|       S Nr   r   r   match_status_codescs    r%   rr   z%Interactions.create.<locals>.<lambda>      5+C+CUENTU+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   rw   rx   retries
server_urlr~   r   _body_kwargskv_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k!n&CMNN+-'[2HRSS+-.K2OL  {*w+/EOPP{*~/LVWW7<
$,,W5
//::J!!H}}X}=H%//gy1 __g&(G(G	G  ,L-9-?-?-ATTQQe^AqDTLT/<k.JO!0!6!6!8AAUN1O  '3OF#//1P1PQG
 2B1W1W2
. , !!.'"&$(%)*ww5xG4O !4#%*44 22::FF ++44! #!9 " 
> e%%22%?00==+++))#tQ> !	 gu001#%ABL2	h *))^,1&&// %*BfU	
 ??(!V77FD98UKtS 7';6% # 
 $x/ ,{: !44%11 $
 ' 4 #77FD#A8US  ' (#34GH0099==hG  	,X66s Up  	..&&//9&':;	 	s0   P&P&7P,P,P2 2	Q=;8Q88Q=r:   last_event_idinclude_inputr9   r,   r-   r/   idr   r   c                     y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                     yr   r4   r   s	            r%   r   zInteractions.getW  r7   r'   c                     yr   r4   r   s	            r%   r   zInteractions.getr  r7   r'   c                    d}	d}
t         }d}|} j                  |      }| j                  j                  }||}	n j	                  |	|
      }	t        j                  |||||      }t        j                  |      \  }} j                  dd|	|
|dddd|du rdnd	||t        j                   j                  j                  j                  
       j                  j                  d|      }|t         k(  rb 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                  |	xs dddt)         j                  j                  t*        j,                        t/        |d            } j1                  ||d |du xs |dk(  |      }|dk7  rs|dk(  rt        j2                  nt        j4                  }t7        t8         ||||du rdnd t;        |       j                  j<                  j?                  d       !            S 	  ||      S # t@        $ rB}t        jB                   j                  j<                  d    t;        |      ||       Y d}~yd}~ww xY w)"r   Nr   r:   r   r   r9   GET /{api_version}/interactions/{id}FTrg   rh   ri   rj   ru   rv   rw   rx   r0   ry   rz   r{   r|   r}   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   c                    d }t        j                  | dd      r2t        j                  |       }t        t        j
                  | |d      S t        j                  | dd      rt        | d d      S t        j                  | d	d      rHt        j                  |       }	 t        t        j                  | |      }t        j                  || |      t        j                  | dd      rHt        j                  |       }	 t        t        j                  | |      }t        j                  || |      t        j                  |       }t        j                  d| |      # t        j                  $ r}t        j                  d
| |      |d }~ww xY w# t        j                  $ r}t        j                  d
| |      |d }~ww xY w)Nr   ri   Fr   rh   c                 ^    t        j                  | t        j                        j                  S r!   r   r   s    r%   rr   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 % 4 4X >. ,,hPU  ##He5HI &#  ##He5GH % 4 4X >$;@@ %%M
 !>>%x  ##He5GH % 4 4X >$;@@ %%M
 !>>%x  "00:M**.- 3 55  22K % 	" 55  22K % 	r   r   getInteractionByIdr   r   r   c                 2    t        j                  ddg|       S r   r   r   s    r%   rr   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/   rw   rx   r   r   r~   r   r0   r   r   r   r   r   r   r   r   s   `                       r%   r   zInteractions.get  s   2 7<
$,,W5
//::J!!H}}X}=H22''#
 2B1W1W2
. , !!3'"'$(%)*~ !4#%*55 22::FF ++44"!) " 
. e%%22%?00==+++))#tQ> !	 gu001#%ABL6	p *))^-1&&// %*BfU	
 ??(!VT>L%=%L% # 
 $x/ ,{: !44%11 $
 ' 4,2dN.
#34GH0099==hG
 
	,X66 	..&&//9&':;	 	s   0I8 8	K8J>>Kr9   r,   r-   r/   c                \   d}d}t         }d}	|}
| j                  |      }|| j                  j                  }|	|	}n| j	                  ||      }t        j                  ||      }t        j                  |
      \  }}
| j                  dd|||ddddd|
|t        j                  | j                  j                  j                  	      | j                  j                  d|
      }|t         k(  rb| 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                  |xs dddt)        | j                  j                  t*        j,                        t/        |d            }| j1                  ||d |dk(  |      }|dk7  rm|dk(  rt        j2                  nt        j4                  }t7        t8         |||d| t;        |      | j                  j<                  j?                  d                  S 	  ||      S # t@        $ rB}t        jB                  | j                  j<                  d   t;        |      ||       Y d}~y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  FTrg   ri   rj   r  r   r   r   r   r   r   r   r   c                 v   d }t        j                  | dd      ry t        j                  | dd      r1	 t        t        j                  |       }t        j
                  ||       t        j                  | dd      r1	 t        t        j                  |       }t        j                  ||       t        j                  d|       # t        j                  $ r'}t        j                  d| | j                        |d }~ww xY w# t        j                  $ r'}t        j                  d| | j                        |d }~ww xY wNr   *r   ri   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  s1   !%M##HeS9##He5GH
$;??%M !==mXVV ##He5GH
$;??%M !==mXVV **+I8TT' 55  22K   	 55  22K   	s/   0C ;0C> C;"C66C;>D8"D33D8r   deleteInteractionr   r   r   c                 2    t        j                  ddg|       S r   r   r   s    r%   rr   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/   rw   rx   r   r   r~   r   r0   r   r   r   r   r   r   r   r   s                        r%   deletezInteractions.deleteI  s   & 7<
$,,W5
//::J!!H}}X}=H11#

 2B1W1W2
. , !!3'"'$(%)* 2%*44 22::FF ++44"!% " 
* e%%22%?00==+++))#tQ> !	 gu001#%ABL	U> *))^,1&&// %*BfU	
 ??(!V+{:% # 
 $x/ ,{: !44%11 $
 ' 4##34GH0099==hG
 
	,X66 	..&&//9&':;	 	   I   	J+)8J&&J+c                \   d}d}t         }d}	|}
| j                  |      }|| j                  j                  }|	|	}n| j	                  ||      }t        j                  ||      }t        j                  |
      \  }}
| j                  dd|||ddddd|
|t        j                  | j                  j                  j                  	      | j                  j                  d|
      }|t         k(  rb| 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                  |xs dddt)        | j                  j                  t*        j,                        t/        |d            }| j1                  ||d |dk(  |      }|dk7  rm|dk(  rt        j2                  nt        j4                  }t7        t8         |||d| t;        |      | j                  j<                  j?                  d                  S 	  ||      S # t@        $ rB}t        jB                  | j                  j<                  d   t;        |      ||       Y d}~y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  re   '/{api_version}/interactions/{id}/cancelFTrg   ri   rj   r  r   r   r   r   r   r   r   r   c                    d }t        j                  | dd      rt        t        j                  | d      S t        j                  | dd      r1	 t        t
        j                  |       }t        j                  ||       t        j                  | dd      r1	 t        t
        j                  |       }t        j                  ||       t        j                  d|       # t
        j                  $ r'}t        j                  d| | j                        |d }~ww xY w# t
        j                  $ r'}t        j                  d| | j                        |d }~ww xY w	Nr   ri   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.  sU   !%M##He5GH. ,,h  ##He5GH$;CCX%M !AA%x  ##He5GH$;CCX%M !AA%x  **+I8TT+ 55  22K   	 55  22K   	s0   0C 0D D/"DDE,"EEr   cancelInteractionByIdr   r   r   c                 2    t        j                  ddg|       S r   r   r   s    r%   rr   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  s   & 7<
$,,W5
//::J!!H}}X}=H55#

 2B1W1W2
. , !!:'"'$(%)* 2%*88 22::FF ++44"!% " 
* e%%22%?00==+++))#tQ> !	 gu001#%ABL#	UJ *))^01&&// %*BfU	
 ??(!V+{:% # 
 $x/ ,{: !44%11 $
 ' 4##34GH0099==hG
 
	,X66 	..&&//9&':;	 	r(  ),__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'  r7  r4   r'   r%   r   r      s   1 1 7 7  6:37269= ++V-Q-QQ
  S 12 gc3h/0 WS#X./ %u}} 456 
|''0P0P)QQ	R .  &*.2"%.1CF"%'*14:=RUKN@C!5937269=/6 c]6 !!	6
 gend*+6 6 6  6 L**+6 ","?"?@6  6 "%6 #..6 %776 &OO6  "HH!6" (==#6$ %6& 22'6(  S 12)6* gc3h/0+6, WS#X./-6. %u}} 456/60 
	!	!16 6p  &* "%.1CF"%'*14:=RUKN@C!5937269=/6 c]6 !!	6
 6 6 6  6 L**+6 ","?"?@6  6 "%6 #..6 %776 &OO6  "HH!6" (==#6$ %6& 22'6(  S 12)6* gc3h/0+6, WS#X./-6. %u}} 456/60 
00	116 6p  &*.2"%.1CF"%'*14:=RUKNLO5937269=-0 c]0 ''	0
 gend*+0 0 0  0 L**+0 ","?"?@0  0 "%0 #..0 %770 &OO0  "HH!0" #II#0$ 22%0&  S 12'0( gc3h/0)0* WS#X./+0, %u}} 456-0. 
	!	!/0 0d  &* "%.1CF"%'*14:=RUKNLO5937269=-0 c]0 ''	0
 0 0 0  0 L**+0 ","?"?@0  0 "%0 #..0 %770 &OO0  "HH!0" #II#0$ 22%0&  S 12'0( gc3h/0)0* WS#X./+0, %u}} 456-0. 
00	1/0 0d  -25937269=, "&1163W3WWX
, &c*,  S 12, gc3h/0, WS#X./, %u}} 456, , 
|''0P0P)QQ	R, ,f -25937269=t "&1163W3WWX
t &c*t  S 12t gc3h/0t WS#X./t %u}} 456t t 
|''0P0P)QQ	Rtl 
 /3'+(-%)59379= gend*+	
  }  ~ c]  S 12 gc3h/0 %u}} 456 
	!	! 4  (,(-%)59379= 	
  }  ~ c]  S 12 gc3h/0 %u}} 456 
00	1 4  (,(-%)59379= 	
  }  ~ c]  S 12 gc3h/0 %u}} 456 
|''0P0P)QQ	R < "''+(-%)59379=zz 	z
  }z  ~z c]z  S 12z gc3h/0z %u}} 456z 
|''0P0P)QQ	Rz@ &*59379=VV c]	V
  S 12V gc3h/0V %u}} 456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y)r"   sdkr1   Nc                 :   || _         t        j                  |j                  d      | _        t        j                  |j                  d      | _        t        j                  |j
                  d      | _        t        j                  |j                  d      | _        y Nr,   )_sdkr   to_raw_response_wrapperr6   r   r'  r7  r$   rQ  s     r%   __init__z$InteractionsWithRawResponse.__init__  sv    	&>>JJ
 $;;CGG_U&>>JJ
 '>>JJ
r'   r8  r9  r:  r   rW  r4   r'   r%   r"   r"     s    
L 
T 
r'   r"   c                       e Zd ZdeddfdZy)r)   rQ  r1   Nc                 :   || _         t        j                  |j                  d      | _        t        j                  |j                  d      | _        t        j                  |j
                  d      | _        t        j                  |j                  d      | _        y rS  )rT  r   to_streamed_response_wrapperr6   r   r'  r7  rV  s     r%   rW  z*InteractionsWithStreamingResponse.__init__  s{    	&CCJJ
 $@@GG_
 'CCJJ
 'CCJJ
r'   rX  r4   r'   r%   r)   r)     s    
L 
T 
r'   r)   c            /       ~   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j6                     deej8                     dededej:                  dej<                  dej>                  dej@                  dejB                  dedejD                  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j6                     deej8                     dededej:                  dej<                  dej>                  dej@                  dejB                  dedejD                  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jF                  deed   df   dedededeej6                     deej8                     dededej:                  dej<                  dejH                  dejJ                  d&ejL                  dejD                  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jF                  ded"   dedededeej6                     deej8                     dededej:                  dej<                  dejH                  dejJ                  d&ejL                  dejD                  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+y):AsyncInteractionsc                     t        |       S r!   ) AsyncInteractionsWithRawResponser#   s    r%   r&   z#AsyncInteractions.with_raw_response  s    /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   ywr3   r4   r5   s         r%   r6   zAsyncInteractions.create          .r8   r9   rH   r:   Fr;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rI   c                   K   ywrK   r4   rL   s                         r%   r6   zAsyncInteractions.create  rc  rd  rM   Tc                   K   ywrK   r4   rL   s                         r%   r6   zAsyncInteractions.create  rc  rd  rO   rQ   rP   c                   K   ywrS   r4   rT   s                        r%   r6   zAsyncInteractions.create3  rc  rd  rU   c                   K   ywrS   r4   rT   s                        r%   r6   zAsyncInteractions.createf  rc  rd  rW   rX   c                   K   ywrZ   r4   r\   s           r%   r6   zAsyncInteractions.create  rc  rd  c                	   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                  j                  }||}n j                  ||	      }t        ur]t        t        j                  t        t              rn1t        j                  t        t              t        j                              nt        |      }|j                         D ci c]  \  }}|t        us|| }}}d|i}|j                         D ci c]  \  }}|t        us|| }}}||d<   t        t        j                  t        j                  |t        j                              t!        j"                  |      \  }} 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(  rb j                  j0                  t        ur j                  j0                  }
n/t        j2                  dt        j4                  dddd      dd       }
d}t        |
t        j2                        r|
g d!f} fd"}t7         j                  |xs d#d$dt9         j                  j.                  t:        j<                        t?        |d%&      '      } jA                  ||d( t'        t'        dd      dd      du xs |d)k(  |*       d{   }|d+k7  r|d)k(  rt         jB                  nt         jD                  }t        t         |||t'        t'        dd      dd      du rd,nd- tG        |       j                  jH                  jK                  d.       j                  jH                  jK                  d/      0            S 	  ||       d{   S c c}}w c c}}w 7 7 # tL        $ r{}t!        jN                   j                  jH                  jK                  d/       j                  jH                  jK                  d.      tG        |      ||       d{  7   Y d}~yd}~ww xY ww)1r[   rH   rQ   r^   rP   r_   rF   r`   ra   rG   rb   rc   Nr9   rd   re   rf   Trg   r:   Frh   ri   rj   c                  j    t        j                  j                  dddt        j                         S rl   rn   rq   s   r%   rr   z*AsyncInteractions.create.<locals>.<lambda>=  rs   r'   rt   r   r   r   r   r   r   r   r   c                   K   d }t        j                  | dd      r:t        j                  |        d {   }t        t        j
                  | |d      S t        j                  | dd      rt        | d d      S t        j                  | d	d      rPt        j                  |        d {   }	 t        t        j                  | |      }t        j                  || |      t        j                  | dd      rPt        j                  |        d {   }	 t        t        j                  | |      }t        j                  || |      t        j                  |        d {   }t        j                  d| |      7 K7 # t        j                  $ r}t        j                  d
| |      |d }~ww xY w7 # t        j                  $ r}t        j                  d
| |      |d }~ww xY w7 w)Nr   ri   Fr   rh   c                 ^    t        j                  | t        j                        j                  S r!   r   r   s    r%   rr   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  s    !%M##He5GH&+&@&@&J J. ,,hPU  ##He5HI" &#  ##He5GH&+&@&@&J J$;??=%M !==%x  ##He5GH&+&@&@&J J$;??=%M !==%x  #("<"<X"FFM**.- [ !K !K 55  22K % 	 !K 55  22K % 	 G   2G/F A7G/-F.G/32F %/G/F8G/2F: G/$G-%G/G/F5F00F55G/:G*G%%G**G/r   r   asyncr   r   c                 2    t        j                  ddg|       S r   r   r   s    r%   rr   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k!n&CMNN+-'[2HRSS+-.K2OL  {*w+/EOPP{*~/LVWW7<
$,,W5
//::J!!H}}X}=H%//gy1 __g&(G(G	G  ,L-9-?-?-ATTQQe^AqDTLT/<k.JO!0!6!6!8AAUN1O  '3OF#//1P1PQG
 2B1W1W2
. , ''.'"&$(%)*ww5xG4O !4#%*44 22::FF ++44! #!9 ( 
> e%%22%?00==+++))#tQ> !	 gu001#%ABL2	h *))^,1&&// %*BgV	
 ..(!V77FD98UKtS 7';6% / 
 
 $x/ ,{: !99%66 $
 ' 4 #77FD#A8US  ' (#34GH0099==hG $ 6 6 ? ? C CN S "		28<<<u Up
@ = 	"::&&//33NC&&//33H=&':;  	s   ES3	QQS39Q"
Q"HS3Q(B6S3Q, Q*Q, S3*Q, ,	S05A+S+ S#!S+&S3+S00S3r   r   r   r   c                   K   ywr   r4   r   s	            r%   r   zAsyncInteractions.get  rc  rd  r   c                   K   ywr   r4   r   s	            r%   r   zAsyncInteractions.get  rc  rd  c                   K   ywr   r4   r   s	            r%   r   zAsyncInteractions.get  rc  rd  c                v   K   d}	d}
t         }d}|} j                  |      }| j                  j                  }||}	n j	                  |	|
      }	t        j                  |||||      }t        j                  |      \  }} j                  dd|	|
|dddd|du rdnd	||t        j                   j                  j                  j                  
       j                  j                  d|      }|t         k(  rb 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                  |	xs dddt)         j                  j                  t*        j,                        t/        |d            } j1                  ||d |du xs |dk(  |       d{   }|dk7  r|dk(  rt        j2                  nt        j4                  }t7        t8         ||||du rdnd t;        |       j                  j<                  j?                  d        j                  j<                  j?                  d!      "            S 	  ||       d{   S 7 7 # t@        $ r{}t        jB                   j                  j<                  j?                  d!       j                  j<                  j?                  d       t;        |      ||       d{  7   Y d}~yd}~ww xY ww)#r   Nr  r  r  FTrg   rh   ri   rj   r  r   r   r   r   r   r   r   r   c                   K   d }t        j                  | dd      r:t        j                  |        d {   }t        t        j
                  | |d      S t        j                  | dd      rt        | d d      S t        j                  | d	d      rPt        j                  |        d {   }	 t        t        j                  | |      }t        j                  || |      t        j                  | dd      rPt        j                  |        d {   }	 t        t        j                  | |      }t        j                  || |      t        j                  |        d {   }t        j                  d| |      7 K7 # t        j                  $ r}t        j                  d
| |      |d }~ww xY w7 # t        j                  $ r}t        j                  d
| |      |d }~ww xY w7 w)Nr   ri   Fr   rh   c                 ^    t        j                  | t        j                        j                  S r!   r   r   s    r%   rr   zJAsyncInteractions.get.<locals>._speakeasy_parse_response.<locals>.<lambda>s  r   r'   r   r   r   r   r   r   )r   r   rn  r   r   r   r   r   r
  r  r   r   r  r  r   s       r%   r   z8AsyncInteractions.get.<locals>._speakeasy_parse_responsei  s     !%M##He5GH&+&@&@&J J. ,,hPU  ##He5HI" &#  ##He5GH&+&@&@&J J$;@@ %%M
 !>>%x  ##He5GH&+&@&@&J J$;@@ %%M
 !>>%x  #("<"<X"FFM**.- c !K !K 55  22K % 	 !K 55  22K % 	 Gro  r   r  rp  r   r   c                 2    t        j                  ddg|       S r   r   r   s    r%   rr   z'AsyncInteractions.get.<locals>.<lambda>  r   r'   r   r   r   r   r   r   rr  rs  )"r   r   r   r   r   r   r  r   r   ru  r  r   r9   r   r   r   r   r   r   r   r   r   r   r	   rv  rw  rx  r   r   r   r   r   r   ry  r  s   `                       r%   r   zAsyncInteractions.get  sK    2 7<
$,,W5
//::J!!H}}X}=H22''#
 2B1W1W2
. , ''3'"'$(%)*~ !4#%*55 22::FF ++44"!) ( 
. e%%22%?00==+++))#tQ> !	 gu001#%ABL6	p *))^-1&&// %*BgV	
 ..(!VT>L%=%L% / 
 
 $x/ ,{: !99%66 $
 ' 4,2dN.
#34GH0099==hG $ 6 6 ? ? C CN S 		28<<<5
4 = 	"::&&//33NC&&//33H=&':;  	s\   G9L9<J.=B L9J2 )J0*J2 -L90J2 2	L6;A+L1&L)'L1,L91L66L9r  c                F  K   d}d}t         }d}	|}
| j                  |      }|| j                  j                  }|	|	}n| j	                  ||      }t        j                  ||      }t        j                  |
      \  }}
| j                  dd|||ddddd|
|t        j                  | j                  j                  j                  	      | j                  j                  d|
      }|t         k(  rb| 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                  |xs dddt)        | j                  j                  t*        j,                        t/        |d            }| j1                  ||d |dk(  |       d{   }|dk7  r|dk(  rt        j2                  nt        j4                  }t7        t8         |||d| t;        |      | j                  j<                  j?                  d      | j                  j<                  j?                  d                   S 	  ||       d{   S 7 7 # t@        $ r{}t        jB                  | j                  j<                  j?                  d      | j                  j<                  j?                  d      t;        |      ||       d{  7   Y d}~yd}~ww xY ww)!r  Nr  r  r  FTrg   ri   rj   r  r   r   r   r   r   r   r   r   c                 ~  K   d }t        j                  | dd      ry t        j                  | dd      r1	 t        t        j                  |       }t        j
                  ||       t        j                  | dd      r1	 t        t        j                  |       }t        j                  ||       t        j                  d|       # t        j                  $ r'}t        j                  d| | j                        |d }~ww xY w# t        j                  $ r'}t        j                  d| | j                        |d }~ww xY wwr  r  r!  s      r%   r   z;AsyncInteractions.delete.<locals>._speakeasy_parse_response  s4    !%M##HeS9##He5GH
$;??%M !==mXVV ##He5GH
$;??%M !==mXVV **+I8TT' 55  22K   	 55  22K   	sL   2D=0C %D==0D  -D=C="C88C==D= D:"D55D::D=r   r"  rp  r   r   c                 2    t        j                  ddg|       S r   r   r   s    r%   rr   z*AsyncInteractions.delete.<locals>.<lambda>H  r   r'   r   r   r   r   r   rr  rs  )"r   r   r   r   r   r   r$  r   r   ru  r%  r   r9   r   r   r   r   r   r   r   r   r   r   r	   rv  rw  rx  r   r   r   r   r   r   ry  r&  s                        r%   r'  zAsyncInteractions.delete  s#    & 7<
$,,W5
//::J!!H}}X}=H11#

 2B1W1W2
. , ''3'"'$(%)* 2%*44 22::FF ++44"!% ( 
* e%%22%?00==+++))#tQ> !	 gu001#%ABL	U> *))^,1&&// %*BgV	
 ..(!V+{:% / 
 
 $x/ ,{: !99%66 $
 ' 4##34GH0099==hG $ 6 6 ? ? C CN S 		28<<<5
4 = 	"::&&//33NC&&//33H=&':;  	\   G(L!*J+BL!J JJ L!J 	L#A+LLLL!LL!c                F  K   d}d}t         }d}	|}
| j                  |      }|| j                  j                  }|	|	}n| j	                  ||      }t        j                  ||      }t        j                  |
      \  }}
| j                  dd|||ddddd|
|t        j                  | j                  j                  j                  	      | j                  j                  d|
      }|t         k(  rb| 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                  |xs dddt)        | j                  j                  t*        j,                        t/        |d            }| j1                  ||d |dk(  |       d{   }|dk7  r|dk(  rt        j2                  nt        j4                  }t7        t8         |||d| t;        |      | j                  j<                  j?                  d      | j                  j<                  j?                  d                   S 	  ||       d{   S 7 7 # t@        $ r{}t        jB                  | j                  j<                  j?                  d      | j                  j<                  j?                  d      t;        |      ||       d{  7   Y d}~yd}~ww xY ww)!r*  Nr  re   r+  FTrg   ri   rj   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      r1	 t        t
        j                  |       }t        j                  ||       t        j                  | dd      r1	 t        t
        j                  |       }t        j                  ||       t        j                  d|       # t
        j                  $ r'}t        j                  d| | j                        |d }~ww xY w# t
        j                  $ r'}t        j                  d| | j                        |d }~ww xY wwr-  r.  r!  s      r%   r   z;AsyncInteractions.cancel.<locals>._speakeasy_parse_response  sX    !%M##He5GH. ,,h  ##He5GH$;CCX%M !AA%x  ##He5GH$;CCX%M !AA%x  **+I8TT+ 55  22K   	 55  22K   	sN   AE0C  E0D ED1"DDEE."EEEr   r3  rp  r   r   c                 2    t        j                  ddg|       S r   r   r   s    r%   rr   z*AsyncInteractions.cancel.<locals>.<lambda>  r   r'   r   r   r   r   r   rr  rs  )"r   r   r   r   r   r   r5  r   r   ru  r6  r   r9   r   r   r   r   r   r   r   r   r   r   r	   rv  rw  rx  r   r   r   r   r   r   ry  r&  s                        r%   r7  zAsyncInteractions.canceli  s$    & 7<
$,,W5
//::J!!H}}X}=H55#

 2B1W1W2
. , '':'"'$(%)* 2%*88 22::FF ++44"!% ( 
* e%%22%?00==+++))#tQ> !	 gu001#%ABL#	UJ *))^01&&// %*BgV	
 ..(!V+{:% / 
 
 $x/ ,{: !99%66 $
 ' 4##34GH0099==hG $ 6 6 ? ? C CN S 		28<<<5
4 = 	"::&&//33NC&&//33H=&':;  	r  ),r8  r9  r:  r;  r&   r*   r   r   r   r   r<  r   r   r=  r   r>  r?  r@  r   r   r   rA  r6   rB  r   rC  r   rD  rE  rF  rG  rH  rI  rJ  rK  rL  rM  rN  rO  r   r   r   r'  r7  r4   r'   r%   r]  r]    s   6 6 < <  6:37269= ++V-Q-QQ
  S 12 gc3h/0 WS#X./ %u}} 456 
|''\5U5U)VV	W .  &*.2"%.1CF"%'*14:=RUKN@C!5937269=/6 c]6 !!	6
 gend*+6 6 6  6 L**+6 ","?"?@6  6 "%6 #..6 %776 &OO6  "HH!6" (==#6$ %6& 22'6(  S 12)6* gc3h/0+6, WS#X./-6. %u}} 456/60 
	!	!16 6p  &* "%.1CF"%'*14:=RUKN@C!5937269=/6 c]6 !!	6
 6 6 6  6 L**+6 ","?"?@6  6 "%6 #..6 %776 &OO6  "HH!6" (==#6$ %6& 22'6(  S 12)6* gc3h/0+6, WS#X./-6. %u}} 456/60 
\55	616 6p  &*.2"%.1CF"%'*14:=RUKNLO5937269=-0 c]0 ''	0
 gend*+0 0 0  0 L**+0 ","?"?@0  0 "%0 #..0 %770 &OO0  "HH!0" #II#0$ 22%0&  S 12'0( gc3h/0)0* WS#X./+0, %u}} 456-0. 
	!	!/0 0d  &* "%.1CF"%'*14:=RUKNLO5937269=-0 c]0 ''	0
 0 0 0  0 L**+0 ","?"?@0  0 "%0 #..0 %770 &OO0  "HH!0" #II#0$ 22%0&  S 12'0( gc3h/0)0* WS#X./+0, %u}} 456-0. 
\55	6/0 0d  -25937269=, "&1163W3WWX
, &c*,  S 12, gc3h/0, WS#X./, %u}} 456, , 
|''\5U5U)VV	W, ,f -25937269=v "&1163W3WWX
v &c*v  S 12v gc3h/0v WS#X./v %u}} 456v v 
|''\5U5U)VV	Wvp 
 /3'+(-%)59379= gend*+	
  }  ~ c]  S 12 gc3h/0 %u}} 456 
	!	! 4  (,(-%)59379= 	
  }  ~ c]  S 12 gc3h/0 %u}} 456 
\55	6 4  (,(-%)59379= 	
  }  ~ c]  S 12 gc3h/0 %u}} 456 
|''\5U5U)VV	W < "''+(-%)59379=|| 	|
  }|  ~| c]|  S 12| gc3h/0| %u}} 456| 
|''\5U5U)VV	W|D &*59379=XX c]	X
  S 12X gc3h/0X %u}} 456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y)r_  rQ  r1   Nc                 :   || _         t        j                  |j                  d      | _        t        j                  |j                  d      | _        t        j                  |j
                  d      | _        t        j                  |j                  d      | _        y rS  )rT  r   async_to_raw_response_wrapperr6   r   r'  r7  rV  s     r%   rW  z)AsyncInteractionsWithRawResponse.__init__	  s{    	&DDJJ
 $AAGG_
 'DDJJ
 'DDJJ
r'   r8  r9  r:  r]  rW  r4   r'   r%   r_  r_  
	      
- 
$ 
r'   r_  c                       e Zd ZdeddfdZy)ra  rQ  r1   Nc                 :   || _         t        j                  |j                  d      | _        t        j                  |j                  d      | _        t        j                  |j
                  d      | _        t        j                  |j                  d      | _        y rS  )rT  r   "async_to_streamed_response_wrapperr6   r   r'  r7  rV  s     r%   rW  z/AsyncInteractionsWithStreamingResponse.__init__	  s{    	&IIJJ
 $FFGG_
 'IIJJ
 'IIJJ
r'   r  r4   r'   r%   ra  ra  	  r  r'   ra  )(__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   r?  typingr   r   r   r   r   r   r   r   r   r"   r)   r]  r_  ra  r4   r'   r%   <module>r     s{   " H * * H H * C C : 5 B  O O O_7 _D#
 

 
"g gT#
 
"
 
r'   