
    R-j
                      d dl mZ d dlmZmZmZ d dlmZmZ d dl	Z	ddl
mZmZ ddlmZmZmZmZmZmZmZ ddlmZmZmZ dd	l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' ddl(m)Z)m*Z*m+Z+m,Z,m-Z- ddl.m/Z/ ddl0m1Z1 ddl2m3Z3 ddl4m5Z5 ddl6m7Z7 ddl8m9Z9 ddgZ: G d de      Z; G d de      Z< G d d      Z= G d d      Z> G d d      Z? G d d       Z@y)!    )annotations)ListUnionIterable)LiteraloverloadN   )interaction_get_paramsinteraction_create_params)BodyOmitQueryHeadersNotGivenomit	not_given)required_argsmaybe_transformasync_maybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)to_raw_response_wrapperto_streamed_response_wrapperasync_to_raw_response_wrapper"async_to_streamed_response_wrapper)StreamAsyncStream)make_request_options)LegacyLyriaInteractionStream!LegacyLyriaInteractionAsyncStream%LegacyLyriaInteractionDetectingStream*LegacyLyriaInteractionDetectingAsyncStreamis_legacy_lyria_request)	ToolParam)Interaction)
ModelParam)WebhookConfigParam)InteractionSSEEvent)GenerationConfigParamInteractionsResourceAsyncInteractionsResourcec                  $   e Zd Zedd       Zedd       Zedeeeeeeeeeeeeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd       Z	edeeeeeeeeeeeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d d	       Z	edeeeeeeeeeeeeeddded
	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d!d       Z	edeeeeeeeeeeeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d"d       Z	edeeeeeeeeeeeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d#d       Z	 e
ddgg dddgg d      deeeeeeeeeeeeeeeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d$d       Z	dddded	 	 	 	 	 	 	 	 	 	 	 	 	 d%dZdddded	 	 	 	 	 	 	 	 	 	 	 	 	 d&dZedeeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d'd       Zedeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d(d       Zedeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d)d       Zdeeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d*dZy)+r+   c                    t        |       S a$  
        This property can be used as a prefix for any HTTP method call to return
        the raw response object instead of the parsed content.

        For more information, see https://www.github.com/stainless-sdks/gemini-next-gen-api-python#accessing-raw-response-data-eg-headers
        )#InteractionsResourceWithRawResponseselfs    /Users/jameslopez/projects/TradingBot25/.venv/lib/python3.12/site-packages/google/genai/_interactions/resources/interactions.pywith_raw_responsez&InteractionsResource.with_raw_response8   s     3488    c                    t        |       S z
        An alternative to `.with_raw_response` that doesn't eagerly read the response body.

        For more information, see https://www.github.com/stainless-sdks/gemini-next-gen-api-python#with_streaming_response
        ))InteractionsResourceWithStreamingResponser1   s    r3   with_streaming_responsez,InteractionsResource.with_streaming_responseB   s     9>>r5   Napi_version
backgroundenvironmentgeneration_configprevious_interaction_idresponse_formatresponse_mime_typeresponse_modalitiesservice_tierstorestreamsystem_instructiontoolswebhook_configextra_headersextra_query
extra_bodytimeoutinputmodelc                    ya  
        Creates a new interaction.

        Args:
          input: The input for the interaction.

          model: The name of the `Model` used for generating the interaction.

          background: Input only. Whether to run the model interaction in the background.

          environment: The environment configuration for the interaction. Can be an object specifying
              remote environment sources or a string referencing an existing environment ID.

          generation_config: Input only. Configuration parameters for the model interaction.

          previous_interaction_id: The ID of the previous interaction, if any.

          response_format: Enforces that the generated response is a JSON object that complies with the
              JSON schema specified in this field.

          response_mime_type: The mime type of the response. This is required if response_format is set.

          response_modalities: The requested modalities of the response (TEXT, IMAGE, AUDIO).

          service_tier: The service tier for the interaction.

          store: Input only. Whether to store the response and request for later retrieval.

          stream: Input only. Whether the interaction will be streamed.

          system_instruction: System instruction for the interaction.

          tools: A list of tool declarations the model may call during interaction.

          webhook_config: Optional. Webhook configuration for receiving notifications when the interaction
              completes.

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        N r2   r;   rM   rN   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   s                        r3   createzInteractionsResource.createK       P 	r5   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rF   rG   rH   rI   rJ   rK   rL   c                    ya  
        Creates a new interaction.

        Args:
          input: The input for the interaction.

          model: The name of the `Model` used for generating the interaction.

          stream: Input only. Whether the interaction will be streamed.

          background: Input only. Whether to run the model interaction in the background.

          environment: The environment configuration for the interaction. Can be an object specifying
              remote environment sources or a string referencing an existing environment ID.

          generation_config: Input only. Configuration parameters for the model interaction.

          previous_interaction_id: The ID of the previous interaction, if any.

          response_format: Enforces that the generated response is a JSON object that complies with the
              JSON schema specified in this field.

          response_mime_type: The mime type of the response. This is required if response_format is set.

          response_modalities: The requested modalities of the response (TEXT, IMAGE, AUDIO).

          service_tier: The service tier for the interaction.

          store: Input only. Whether to store the response and request for later retrieval.

          system_instruction: System instruction for the interaction.

          tools: A list of tool declarations the model may call during interaction.

          webhook_config: Optional. Webhook configuration for receiving notifications when the interaction
              completes.

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        NrQ   r2   r;   rM   rN   rE   r<   r=   r>   r?   r@   rA   rB   rC   rD   rF   rG   rH   rI   rJ   rK   rL   s                        r3   rS   zInteractionsResource.create   rT   r5   r;   agent_configr<   r=   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   agentc                    ya  
        Creates a new interaction.

        Args:
          agent: The name of the `Agent` used for generating the interaction.

          input: The input for the interaction.

          agent_config: Configuration parameters for the agent interaction.

          background: Input only. Whether to run the model interaction in the background.

          environment: The environment configuration for the interaction. Can be an object specifying
              remote environment sources or a string referencing an existing environment ID.

          previous_interaction_id: The ID of the previous interaction, if any.

          response_format: Enforces that the generated response is a JSON object that complies with the
              JSON schema specified in this field.

          response_mime_type: The mime type of the response. This is required if response_format is set.

          response_modalities: The requested modalities of the response (TEXT, IMAGE, AUDIO).

          service_tier: The service tier for the interaction.

          store: Input only. Whether to store the response and request for later retrieval.

          stream: Input only. Whether the interaction will be streamed.

          system_instruction: System instruction for the interaction.

          tools: A list of tool declarations the model may call during interaction.

          webhook_config: Optional. Webhook configuration for receiving notifications when the interaction
              completes.

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        NrQ   r2   r;   r[   rM   rZ   r<   r=   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   s                        r3   rS   zInteractionsResource.create       ^ 	r5   r;   rZ   r<   r=   r?   r@   rA   rB   rC   rD   rF   rG   rH   rI   rJ   rK   rL   c                    ya  
        Creates a new interaction.

        Args:
          agent: The name of the `Agent` used for generating the interaction.

          input: The input for the interaction.

          stream: Input only. Whether the interaction will be streamed.

          agent_config: Configuration parameters for the agent interaction.

          background: Input only. Whether to run the model interaction in the background.

          environment: The environment configuration for the interaction. Can be an object specifying
              remote environment sources or a string referencing an existing environment ID.

          previous_interaction_id: The ID of the previous interaction, if any.

          response_format: Enforces that the generated response is a JSON object that complies with the
              JSON schema specified in this field.

          response_mime_type: The mime type of the response. This is required if response_format is set.

          response_modalities: The requested modalities of the response (TEXT, IMAGE, AUDIO).

          service_tier: The service tier for the interaction.

          store: Input only. Whether to store the response and request for later retrieval.

          system_instruction: System instruction for the interaction.

          tools: A list of tool declarations the model may call during interaction.

          webhook_config: Optional. Webhook configuration for receiving notifications when the interaction
              completes.

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        NrQ   r2   r;   r[   rM   rE   rZ   r<   r=   r?   r@   rA   rB   rC   rD   rF   rG   rH   rI   rJ   rK   rL   s                        r3   rS   zInteractionsResource.create0  r_   r5   c                    yrW   rQ   rX   s                        r3   rS   zInteractionsResource.create  rT   r5   rM   rN   rE   r[   rM   rE   r;   rN   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   r[   rZ   rI   rJ   rK   rL   c          
        || j                   j                         }|st        d|      |t        ur|t        urt        d      |t        ur|t        urt        d      |r.t	        | j                   j
                  |      rt        t           nt        t           }| j                  | j                   j                  |d      t        i d|d|d	|d
|d|d|d|d|	d|
d|d|d|d|d|d|d|d||rt        j                  nt        j                        t        ||||      t         |xs d|      S N:Expected a non-empty value for `api_version` but received zfInvalid request: specified `model` and `agent_config`. If specifying `model`, use `generation_config`.zfInvalid request: specified `agent` and `generation_config`. If specifying `agent`, use `agent_config`.)	is_vertexrN   interactionsr;   pathrM   rN   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   r[   rZ   rI   rJ   rK   rL   F)bodyoptionscast_torE   
stream_cls)_client_get_api_version_path_param
ValueErrorr   r$   
_is_vertexr    r)   r   _post_build_maybe_vertex_pathr   r   %CreateModelInteractionParamsStreaming(CreateModelInteractionParamsNonStreamingr   r&   r2   r;   rM   rN   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   r[   rZ   rI   rJ   rK   rL   rs   s                           r3   rS   zInteractionsResource.create  s   J ,,BBDKYZeYhijjT!9  F  G  G!2$!>  F  G  G 2T\\=T=T\ab ))<=+, 	
 zzLL11kP^1_ UU !* ";	
 (): ./F & )*< *+> #L U f )*< U %n  U!" #L#(  *OO.WW-0 )+Q[el  ?U!?   
  	
r5   r;   rI   rJ   rK   rL   c          	         || j                   j                         }|st        d|      |st        d|      | j                  | j                   j	                  |d|       t        ||||      t              S )R  
        Deletes the interaction by id.

        Args:
          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        rj   1Expected a non-empty value for `id` but received interactions/rm   ro   rq   rr   rt   ru   rv   _deletery   r   objectr2   idr;   rI   rJ   rK   rL   s          r3   deletezInteractionsResource.delete%  s    0 ,,BBDKYZeYhijjPQSPVWXX||LL11kR_`b_cPd1e(+Q[el   
 	
r5   c          	        || j                   j                         }|st        d|      |st        d|      | j                  | j                   j	                  |d| d      t        ||||      t              S )  Cancels an interaction by id.

        This only applies to background interactions that
        are still running.

        Args:
          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        rj   r   r   /cancelrm   ro   r   rt   ru   rv   rx   ry   r   r&   r   s          r3   cancelzInteractionsResource.cancelK  s    4 ,,BBDKYZeYhijjPQSPVWXXzzLL11kR_`b_ccjPk1l(+Q[el    
 	
r5   r;   include_inputlast_event_idrE   rI   rJ   rK   rL   c                    ya  
        Retrieves the full details of a single interaction based on its
        `Interaction.id`.

        Args:
          include_input: If set to true, includes the input in the response.

          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.

          stream: If set to true, the generated content will be streamed incrementally.

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        NrQ   
r2   r   r;   r   r   rE   rI   rJ   rK   rL   s
             r3   getzInteractionsResource.gets      H 	r5   r;   r   r   rI   rJ   rK   rL   c                    ya  
        Retrieves the full details of a single interaction based on its
        `Interaction.id`.

        Args:
          stream: If set to true, the generated content will be streamed incrementally.

          include_input: If set to true, includes the input in the response.

          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.

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        NrQ   
r2   r   r;   rE   r   r   rI   rJ   rK   rL   s
             r3   r   zInteractionsResource.get  r   r5   c                    yr   rQ   r   s
             r3   r   zInteractionsResource.get  r   r5   c                  || j                   j                         }|st        d|      |st        d|      |r#| j                   j                  rt        t
           nt        t
           }
| j                  | j                   j                  |d|       t        ||||	t        |||dt        j                              t        |xs d|
      S 	Nrj   r   r   rm   )r   r   rE   )rI   rJ   rK   rL   queryF)rq   rr   rE   rs   )rt   ru   rv   rw   r"   r)   r   _getry   r   r   r
   InteractionGetParamsr&   r2   r   r;   r   r   rE   rI   rJ   rK   rL   rs   s              r3   r   zInteractionsResource.get  s     ,,BBDKYZeYhijjPQSPVWXX 4<<22 22EF+, 	
 yyLL11kR_`b_cPd1e(+'%%)6)6"(
 +??  ?U!%  
 	
r5   )returnr0   )r   r8   *r;   
str | NonerM   interaction_create_params.InputrN   r'   r<   bool | Omitr=   ,interaction_create_params.Environment | Omitr>   GenerationConfigParam | Omitr?   
str | Omitr@   /interaction_create_params.ResponseFormat | OmitrA   r   rB   CList[Literal['text', 'image', 'audio', 'video', 'document']] | OmitrC   .Literal['flex', 'standard', 'priority'] | OmitrD   r   rE   Literal[False] | OmitrF   r   rG   Iterable[ToolParam] | OmitrH   WebhookConfigParam | OmitrI   Headers | NonerJ   Query | NonerK   Body | NonerL   'float | httpx.Timeout | None | NotGivenr   r&   )*r;   r   rM   r   rN   r'   rE   Literal[True]r<   r   r=   r   r>   r   r?   r   r@   r   rA   r   rB   r   rC   r   rD   r   rF   r   rG   r   rH   r   rI   r   rJ   r   rK   r   rL   r   r   Stream[InteractionSSEEvent]*r;   r   r[   ~Union[Literal['deep-research-pro-preview-12-2025', 'deep-research-preview-04-2026', 'deep-research-max-preview-04-2026'], str]rM   r   rZ   ,interaction_create_params.AgentConfig | Omitr<   r   r=   r   r?   r   r@   r   rA   r   rB   r   rC   r   rD   r   rE   r   rF   r   rG   r   rH   r   rI   r   rJ   r   rK   r   rL   r   r   r&   )*r;   r   r[   r   rM   r   rE   r   rZ   r   r<   r   r=   r   r?   r   r@   r   rA   r   rB   r   rC   r   rD   r   rF   r   rG   r   rH   r   rI   r   rJ   r   rK   r   rL   r   r   r   )*r;   r   rM   r   rN   r'   rE   boolr<   r   r=   r   r>   r   r?   r   r@   r   rA   r   rB   r   rC   r   rD   r   rF   r   rG   r   rH   r   rI   r   rJ   r   rK   r   rL   r   r   )Interaction | Stream[InteractionSSEEvent]).r;   r   rM   r   rN   ModelParam | Omitr<   r   r=   r   r>   r   r?   r   r@   r   rA   r   rB   r   rC   r   rD   r   rE   %Literal[False] | Literal[True] | OmitrF   r   rG   r   rH   r   r[   Union[Literal['deep-research-pro-preview-12-2025', 'deep-research-preview-04-2026', 'deep-research-max-preview-04-2026'], str] | OmitrZ   r   rI   r   rJ   r   rK   r   rL   r   r   r   r   strr;   r   rI   r   rJ   r   rK   r   rL   r   r   r   r   r   r;   r   rI   r   rJ   r   rK   r   rL   r   r   r&   r   r   r;   r   r   r   r   r   rE   r   rI   r   rJ   r   rK   r   rL   r   r   r&   )r   r   r;   r   rE   r   r   r   r   r   rI   r   rJ   r   rK   r   rL   r   r   r   )r   r   r;   r   rE   r   r   r   r   r   rI   r   rJ   r   rK   r   rL   r   r   r   )r   r   r;   r   r   r   r   r   rE   r   rI   r   rJ   r   rK   r   rL   r   r   r   __name__
__module____qualname__r   r4   r9   r   r   r   rS   r   r   r   r   rQ   r5   r3   r+   r+   7   s
   9 9 ? ?  #' #'DH:>.2KO)-cgGK!(,)-,048 )-$("&;D1G  G /	G
 G  G BG 8G ",G IG 'G aG EG G &G  '!G" *#G$ 2%G* &+G, "-G.  /G0 91G2 
3G GR  #' #'DH:>.2KO)-cgGK!)-,048 )-$("&;D1G  G /	G
 G G  G BG 8G ",G IG 'G aG EG G  '!G" *#G$ 2%G* &+G, "-G.  /G0 91G2 
%3G GR  #' FJ"&DH.2KO)-cgGK!(,)-,048 )-$("&;D?N  N
	N /N CN  N BN  ",!N" I#N$ '%N& a'N( E)N* +N, &-N. '/N0 *1N2 23N8 &9N: ";N<  =N> 9?N@ 
AN N`  #' FJ"&DH.2KO)-cgGK!)-,048 )-$("&;D?N  N
	N /N N CN  N  B!N" ",#N$ I%N& ''N( a)N* E+N, -N. '/N0 *1N2 23N8 &9N: ";N<  =N> 9?N@ 
%AN N`  #' #'DH:>.2KO)-cgGK!)-,048 )-$("&;D1G  G /	G
 G G  G BG 8G ",G IG 'G aG EG G  '!G" *#G$ 2%G* &+G, "-G.  /G0 91G2 
33G GR GW%'CgwEWYuv #'#'"&DH:>.2KO)-cgGK!8<)-,048 EI )-$("&;DEW
  W
 /	W

 !W
  W
 BW
 8W
 ",W
 IW
 'W
 aW
 EW
 W
 6W
  '!W
" *#W
$ 2%W
&'W
8 C9W
> &?W
@ "AW
B  CW
D 9EW
F 
3GW
 wW
z #' )-$("&;D$
$
  	$
 &$
 "$
  $
 9$
 
$
T #' )-$("&;D&
&
  	&
 &&
 "&
  &
 9&
 
&
P 
 #'%)$((, )-$("&;D##  	#
 ## "# &# &# "#  # 9# 
# #J 
 #'%)$( )-$("&;D##  	#
 # ## "# &# "#  # 9# 
%# #J 
 #'%)$( )-$("&;D##  	#
 # ## "# &# "#  # 9# 
3# #R #'%)$(8< )-$("&;D3
3
  	3

 #3
 "3
 63
 &3
 "3
  3
 93
 
33
r5   c                  $   e Zd Zedd       Zedd       Zedeeeeeeeeeeeeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd       Z	edeeeeeeeeeeeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d d	       Z	edeeeeeeeeeeeeeddded
	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d!d       Z	edeeeeeeeeeeeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d"d       Z	edeeeeeeeeeeeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d#d       Z	 e
ddgg dddgg d      deeeeeeeeeeeeeeeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d$d       Z	dddded	 	 	 	 	 	 	 	 	 	 	 	 	 d%dZdddded	 	 	 	 	 	 	 	 	 	 	 	 	 d&dZedeeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d'd       Zedeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d(d       Zedeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d)d       Zdeeeddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d*dZy)+r,   c                    t        |       S r/   )(AsyncInteractionsResourceWithRawResponser1   s    r3   r4   z+AsyncInteractionsResource.with_raw_response  s     8==r5   c                    t        |       S r7   ).AsyncInteractionsResourceWithStreamingResponser1   s    r3   r9   z1AsyncInteractionsResource.with_streaming_response&  s     >dCCr5   Nr:   rM   rN   c                  K   ywrP   rQ   rR   s                        r3   rS   z AsyncInteractionsResource.create/       P 	   rU   c                  K   ywrW   rQ   rX   s                        r3   rS   z AsyncInteractionsResource.createy  r   r   rY   r[   c                  K   ywr]   rQ   r^   s                        r3   rS   z AsyncInteractionsResource.create       ^ 	r   r`   c                  K   ywrb   rQ   rc   s                        r3   rS   z AsyncInteractionsResource.create  r   r   c                  K   ywrW   rQ   rX   s                        r3   rS   z AsyncInteractionsResource.createe  r   r   re   rf   rg   c          
       K   || j                   j                         }|st        d|      |t        ur|t        urt        d      |t        ur|t        urt        d      |r.t	        | j                   j
                  |      rt        t           nt        t           }| j                  | j                   j                  |d      t        i d|d|d	|d
|d|d|d|d|	d|
d|d|d|d|d|d|d|d||rt        j                  nt        j                         d {   t        ||||      t         |xs d|       d {   S 7 *7 wri   )rt   ru   rv   r   r$   rw   r!   r)   r   rx   ry   r   r   rz   r{   r   r&   r|   s                           r3   rS   z AsyncInteractionsResource.create  s    J ,,BBDKYZeYhijjT!9  F  G  G!2$!>  F  G  G
 2T\\=T=T\ab ..AB01 	
 ZZLL11kP^1_,UU !* ";	
 (): ./F & )*< *+> #L U f )*< U %n  U!" #L#(  *OO.WW- 0 )+Q[el  ?U!?    
  
  	
 
s$   D)E+E
,%EEEEr}   c          	       K   || j                   j                         }|st        d|      |st        d|      | j                  | j                   j	                  |d|       t        ||||      t               d{   S 7 w)r   Nrj   r   r   rm   ro   r   r   r   s          r3   r   z AsyncInteractionsResource.delete  s     0 ,,BBDKYZeYhijjPQSPVWXX\\LL11kR_`b_cPd1e(+Q[el  " 
 
 	
 
s   BBB
Bc          	       K   || j                   j                         }|st        d|      |st        d|      | j                  | j                   j	                  |d| d      t        ||||      t               d{   S 7 w)	r   Nrj   r   r   r   rm   ro   r   r   r   s          r3   r   z AsyncInteractionsResource.cancel+  s     4 ,,BBDKYZeYhijjPQSPVWXXZZLL11kR_`b_ccjPk1l(+Q[el     
 
 	
 
s   BBBBr   c                  K   ywr   rQ   r   s
             r3   r   zAsyncInteractionsResource.getS       H 	r   r   c                  K   ywr   rQ   r   s
             r3   r   zAsyncInteractionsResource.gety  r   r   c                  K   ywr   rQ   r   s
             r3   r   zAsyncInteractionsResource.get  r   r   c                 K   || j                   j                         }|st        d|      |st        d|      |r#| j                   j                  rt        t
           nt        t
           }
| j                  | j                   j                  |d|       t        ||||	t        |||dt        j                         d {         t        |xs d|
       d {   S 7 !7 wr   )rt   ru   rv   rw   r#   r)   r   r   ry   r   r   r
   r   r&   r   s              r3   r   zAsyncInteractionsResource.get  s     ,,BBDKYZeYhijjPQSPVWXX
 4<<22 77JK01 	
 YYLL11kR_`b_cPd1e(+'%1)6)6"(
 +??   ?U!%  
 
 	

s$   CC+C'C+"C)#C+)C+)r   r   )r   r   r   )*r;   r   rM   r   rN   r'   rE   r   r<   r   r=   r   r>   r   r?   r   r@   r   rA   r   rB   r   rC   r   rD   r   rF   r   rG   r   rH   r   rI   r   rJ   r   rK   r   rL   r   r    AsyncStream[InteractionSSEEvent]r   )*r;   r   r[   r   rM   r   rE   r   rZ   r   r<   r   r=   r   r?   r   r@   r   rA   r   rB   r   rC   r   rD   r   rF   r   rG   r   rH   r   rI   r   rJ   r   rK   r   rL   r   r   r   )*r;   r   rM   r   rN   r'   rE   r   r<   r   r=   r   r>   r   r?   r   r@   r   rA   r   rB   r   rC   r   rD   r   rF   r   rG   r   rH   r   rI   r   rJ   r   rK   r   rL   r   r   .Interaction | AsyncStream[InteractionSSEEvent]).r;   r   rM   r   rN   r   r<   r   r=   r   r>   r   r?   r   r@   r   rA   r   rB   r   rC   r   rD   r   rE   r   rF   r   rG   r   rH   r   r[   r   rZ   r   rI   r   rJ   r   rK   r   rL   r   r   r   r   r   r   )r   r   r;   r   rE   r   r   r   r   r   rI   r   rJ   r   rK   r   rL   r   r   r   )r   r   r;   r   rE   r   r   r   r   r   rI   r   rJ   r   rK   r   rL   r   r   r   )r   r   r;   r   r   r   r   r   rE   r   rI   r   rJ   r   rK   r   rL   r   r   r   r   rQ   r5   r3   r,   r,     s
   > > D D  #' #'DH:>.2KO)-cgGK!(,)-,048 )-$("&;D1G  G /	G
 G  G BG 8G ",G IG 'G aG EG G &G  '!G" *#G$ 2%G* &+G, "-G.  /G0 91G2 
3G GR  #' #'DH:>.2KO)-cgGK!)-,048 )-$("&;D1G  G /	G
 G G  G BG 8G ",G IG 'G aG EG G  '!G" *#G$ 2%G* &+G, "-G.  /G0 91G2 
*3G GR  #' FJ"&DH.2KO)-cgGK!(,)-,048 )-$("&;D?N  N
	N /N CN  N BN  ",!N" I#N$ '%N& a'N( E)N* +N, &-N. '/N0 *1N2 23N8 &9N: ";N<  =N> 9?N@ 
AN N`  #' FJ"&DH.2KO)-cgGK!)-,048 )-$("&;D?N  N
	N /N N CN  N  B!N" ",#N$ I%N& ''N( a)N* E+N, -N. '/N0 *1N2 23N8 &9N: ";N<  =N> 9?N@ 
*AN N`  #' #'DH:>.2KO)-cgGK!)-,048 )-$("&;D1G  G /	G
 G G  G BG 8G ",G IG 'G aG EG G  '!G" *#G$ 2%G* &+G, "-G.  /G0 91G2 
83G GR GW%'CgwEWYuv #'#'"&DH:>.2KO)-cgGK!8<)-,048 EI )-$("&;DES
  S
 /	S

 !S
  S
 BS
 8S
 ",S
 IS
 'S
 aS
 ES
 S
 6S
  '!S
" *#S
$ 2%S
&'S
8 C9S
> &?S
@ "AS
B  CS
D 9ES
F 
8GS
 wS
r #' )-$("&;D$
$
  	$
 &$
 "$
  $
 9$
 
$
T #' )-$("&;D&
&
  	&
 &&
 "&
  &
 9&
 
&
P 
 #'%)$((, )-$("&;D##  	#
 ## "# &# &# "#  # 9# 
# #J 
 #'%)$( )-$("&;D##  	#
 # ## "# &# "#  # 9# 
*# #J 
 #'%)$( )-$("&;D##  	#
 # ## "# &# "#  # 9# 
8# #R #'%)$(8< )-$("&;D/
/
  	/

 #/
 "/
 6/
 &/
 "/
  /
 9/
 
8/
r5   c                      e Zd ZddZy)r0   c                    || _         t        |j                        | _        t        |j                        | _        t        |j                        | _        t        |j
                        | _        y N)_interactionsr   rS   r   r   r   r2   rl   s     r3   __init__z,InteractionsResourceWithRawResponse.__init__  sd    )-
 .
 .
 +
r5   Nrl   r+   r   Noner   r   r   r   rQ   r5   r3   r0   r0         
r5   r0   c                      e Zd ZddZy)r   c                    || _         t        |j                        | _        t        |j                        | _        t        |j                        | _        t        |j
                        | _        y r   )r   r   rS   r   r   r   r   s     r3   r   z1AsyncInteractionsResourceWithRawResponse.__init__
  sd    )3
 4
 4
 1
r5   Nrl   r,   r   r   r   rQ   r5   r3   r   r   	  r   r5   r   c                      e Zd ZddZy)r8   c                    || _         t        |j                        | _        t        |j                        | _        t        |j                        | _        t        |j
                        | _        y r   )r   r   rS   r   r   r   r   s     r3   r   z2InteractionsResourceWithStreamingResponse.__init__  sd    )2
 3
 3
 0
r5   Nr   r   rQ   r5   r3   r8   r8     r   r5   r8   c                      e Zd ZddZy)r   c                    || _         t        |j                        | _        t        |j                        | _        t        |j                        | _        t        |j
                        | _        y r   )r   r   rS   r   r   r   r   s     r3   r   z7AsyncInteractionsResourceWithStreamingResponse.__init__.  sd    )8
 9
 9
 6
r5   Nr   r   rQ   r5   r3   r   r   -  r   r5   r   )A
__future__r   typingr   r   r   typing_extensionsr   r   httpxtypesr
   r   _typesr   r   r   r   r   r   r   _utilsr   r   r   _compatr   	_resourcer   r   	_responser   r   r   r   
_streamingr   r   _base_clientr   _legacy_lyriar    r!   r"   r#   r$   types.tool_paramr%   types.interactionr&   types.model_paramr'   types.webhook_config_paramr(   types.interaction_sse_eventr)   types.generation_config_paramr*   __all__r+   r,   r0   r   r8   r   rQ   r5   r3   <module>r     s   $ # ( ( /  E J J J J J % 9  - /  ) + * ; = A!#>
?a
? a
HY
 0 Y
x
 
$
 
$
 
$
 
r5   