Ë
    ümxiN  ã                  óÀ  — U d dl mZ d dlmZmZmZ d dlZd dlZd dlmZm	Z	m
Z
 d dlmZ d dlZd dlmZ d dlmZ ej$                  Ze
eeef   Zi ej,                  ej,                  “d ej,                  “dej,                  “d	ej,                  “ej.                  ej.                  “d
ej.                  “dej.                  “dej.                  “ej0                  ej0                  “dej0                  “dej0                  “dej0                  “ej2                  ej2                  “dej2                  “dej2                  “dej2                  “ej4                  ej4                  “dej2                  dej4                  dej4                  ej6                  ej6                  dej6                  dej6                  dej6                  ej8                  ej8                  dej8                  dej8                  dej8                  i¥Zded<   dFd„Zdddœ	 	 	 	 	 	 	 dGd „Z d!„ Z!d"„ Z"d#„ Z#d$„ Z$d%„ Z%d&„ Z&dHd'„Z' G d(„ d)«      Z(e)ed*f   Z*e
e+ee,e*e-d*   df   Z. G d+„ d,e(«      Z/e
e(ejP                  e)eef   e	d-ef   f   Z0	 	 	 	 dId.„Z1dJd/„Z2 G d0„ d1«      Z3 G d2„ d3e«      Z4e
e3ejf                  e4ee0   e0f   Z5dKd4„Z6 G d5„ d6«      Z7e
ee5   e5f   Z8dLd7„Z9e
e7e8f   Z:dMd8„Z;ejx                  jz                  Z>d
e>j~                  e>j~                  e>j~                  d9e>j~                  d:e>j~                  de>j€                  e>j€                  e>j€                  d;e>j€                  d<e>j€                  de>j‚                  e>j‚                  e>j‚                  d=e>j‚                  d>e>j‚                  iZBe
e>eef   ZCdNd?„ZD G d@„ dAe«      ZEe
eCeEejx                  f   ZFdOdB„ZG G dC„ dD«      ZHe
eHej’                  f   ZJdPdE„ZKy)Qé    )Úannotations)ÚIterableÚMappingÚSequenceN)ÚAnyÚCallableÚUnion)Ú	TypedDict)Úprotos)Úcontent_typesÚtype_unspecifiedÚunspecifiedé   Útype_stringÚstringé   Útype_numberÚnumberé   Útype_integerÚintegeré   Útype_booleanÚbooleané   Ú
type_arrayÚarrayé   Útype_objectÚobjectzdict[TypeOptions, Type]Ú
_TYPE_TYPEc                óT   — t        | t        «      r| j                  «       } t        |    S ©N)Ú
isinstanceÚstrÚlowerr!   ©Úxs    úT/home/htdocs/ttos/venv/lib/python3.12/site-packages/google/generativeai/responder.pyÚto_typer*   @   s!   € Ü�!”SÔØ�G‰G‹IˆÜ�a‰=Ðó    )ÚdescriptionsÚrequiredc               óè  — |€i }t        t        j                  | «      j                  «      }i }|j	                  «       D ]É  \  }}|j
                  t        j                  j                  t        j                  j                  t        j                  j                  fv sŒ`t        j                  |j                  |d«      ¬«      }|j                  t        j                  j                  k7  r|j                  |f||<   Œ¿t        |f||<   ŒË t!        | j"                  |«      }|�||d<   n™|D �	cg c]Š  }	||	   j$                  t        j                  j                  k(  r^||	   j
                  t        j                  j                  t        j                  j                  t        j                  j                  fv r|	‘ŒŒ c}	|d<   t        | j"                  | j&                  ¬«      }
|d   r||
d<   |
S c c}	w )a³  Generates the OpenAPI Schema for a python function.

    Args:
        f: The function to generate an OpenAPI Schema for.
        descriptions: Optional. A `{name: description}` mapping for annotating input
            arguments of the function with user-provided descriptions. It
            defaults to an empty dictionary (i.e. there will not be any
            description for any of the inputs).
        required: Optional. For the user to specify the set of required arguments in
            function calls to `f`. If unspecified, it will be automatically
            inferred from `f`.

    Returns:
        dict[str, Any]: The OpenAPI Schema for the function `f` in JSON format.
    N)Údescriptionr-   )Únamer/   Ú
propertiesÚ
parameters)ÚdictÚinspectÚ	signaturer2   ÚitemsÚkindÚ	ParameterÚPOSITIONAL_OR_KEYWORDÚKEYWORD_ONLYÚPOSITIONAL_ONLYÚpydanticÚFieldÚgetÚ
annotationÚemptyr   Ú_build_schemaÚ__name__ÚdefaultÚ__doc__)Úfr,   r-   ÚdefaultsÚfields_dictr0   ÚparamÚfieldr2   ÚkÚschemas              r)   Ú_generate_schemarL   F   s½  € ð* ÐØˆÜ”G×%Ñ% aÓ(×3Ñ3Ó4€Hà€KØ—~‘~Ó'ò /‰ˆˆeØ�:‰:Ü×Ñ×3Ñ3Ü×Ñ×*Ñ*Ü×Ñ×-Ñ-ð
ò 
ô —N‘Nà(×,Ñ,¨T°4Ó8ôˆEð ×Ñ¤7×#4Ñ#4×#:Ñ#:Ò:Ø$)×$4Ñ$4°eÐ$;�˜DÒ!ä$'¨ J�˜DÒ!ð+/ô. ˜qŸz™z¨;Ó7€Jð Ðà!)ˆ
�:Òð
 ö"
àà˜‘×#Ñ#¤w×'8Ñ'8×'>Ñ'>Ò>Ø˜Q‘K×$Ñ$ä×%Ñ%×;Ñ;Ü×%Ñ%×2Ñ2Ü×%Ñ%×5Ñ5ðñò	 ò"
ˆ
�:Ñô �q—z‘z¨q¯y©yÔ9€FØ�,ÒØ)ˆˆ|Ñà€Mùò#"
s   Ä-BG/c                ó*  — t        j                  | fi |¤Žj                  «       }|j                  di «      }|j	                  «       D ]  \  }}t        ||«       Œ t        ||«       t        |«       t        |«       t        |«       t        |«       |S )Nz$defs)
r<   Úcreate_modelÚmodel_json_schemaÚpopr6   Úunpack_defsÚconvert_to_nullableÚadd_object_typeÚstrip_titlesÚstrip_additional_properties)ÚfnamerG   r2   Údefsr0   Úvalues         r)   rA   rA   “   s‡   € Ü×&Ñ& uÑ<°Ñ<×NÑNÓP€JØ�>‰>˜' 2Ó&€Dà—z‘z“|ò !‰ˆˆeÜ�E˜4Õ ð!ä�
˜DÔ!ô ˜
Ô#Ü�JÔô
 �ÔÜ 
Ô+ØÐr+   c                óF  — | j                  dd «      }|€y |j                  «       D ]ù  \  }}|j                  dd «      }|�)||j                  d«      d      }t        ||«       |||<   ŒC|j                  dd «      }|�Qt	        |«      D ]B  \  }}	|	j                  dd «      }|€Œ||j                  d«      d      }t        ||«       |||<   ŒD Œ¨|j                  dd «      }
|
€Œ½|
j                  dd «      }|€ŒÒ||j                  d«      d      }t        ||«       ||d<   Œû y )Nr1   z$refzdefs/éÿÿÿÿÚanyOfr6   )r>   r6   ÚsplitrQ   Ú	enumerate)rK   rW   r1   r0   rX   Úref_keyÚrefÚanyofÚiÚatyper6   s              r)   rQ   rQ   ª   sJ  € Ø—‘˜L¨$Ó/€JØÐØà!×'Ñ'Ó)ò ‰ˆˆeØ—)‘)˜F DÓ)ˆØÐØ�w—}‘} WÓ-¨bÑ1Ñ2ˆCÜ˜˜TÔ"Ø"ˆJ�tÑØà—	‘	˜' 4Ó(ˆØÐÜ% eÓ,ò #‘��5ØŸ)™) F¨DÓ1�ØÑ&Ø˜wŸ}™}¨WÓ5°bÑ9Ñ:�CÜ  TÔ*Ø"�E˜!’Hð#ð à—	‘	˜' 4Ó(ˆØÑØ—i‘i ¨Ó-ˆGØÑ"Ø˜7Ÿ=™=¨Ó1°"Ñ5Ñ6�Ü˜C Ô&Ø!$��g‘Øñ3r+   c                óÖ   — | j                  dd «      }| j                  dd «      }|�#|j                  «       D ]  \  }}t        |«       Œ | j                  dd «      }|�t        |«       y y )NÚtitler1   r6   )rP   r>   r6   rT   )rK   rd   r1   r0   rX   r6   s         r)   rT   rT   Ë   sq   € Ø�J‰J�w Ó%€Eà—‘˜L¨$Ó/€JØÐØ%×+Ñ+Ó-ò 	 ‰KˆD�%Ü˜Õð	 ð �J‰J�w Ó%€EØÐÜ�UÕð r+   c                óÖ   — | j                  dd «       | j                  dd «      }|�#|j                  «       D ]  \  }}t        |«       Œ | j                  dd «      }|�t        |«       y y )NÚadditionalPropertiesr1   r6   )rP   r>   r6   rU   ©rK   r1   r0   rX   r6   s        r)   rU   rU   Ø   sp   € Ø
‡J�JÐ% tÔ,à—‘˜L¨$Ó/€JØÐØ%×+Ñ+Ó-ò 	/‰KˆD�%Ü'¨Õ.ð	/ð �J‰J�w Ó%€EØÐÜ# EÕ*ð r+   c                óà   — | j                  dd «      }|�:| j                  dd «       d| d<   |j                  «       D ]  \  }}t        |«       Œ | j                  dd «      }|�t        |«       y y )Nr1   r-   r    Útyper6   )r>   rP   r6   rS   rg   s        r)   rS   rS   å   sx   € Ø—‘˜L¨$Ó/€JØÐØ�
‰
�:˜tÔ$Ø!ˆˆv‰Ø%×+Ñ+Ó-ò 	#‰KˆD�%Ü˜EÕ"ð	#ð �J‰J�w Ó%€EØÐÜ˜Õð r+   c                óš  — | j                  dd «      }|�`t        |«      dk7  rt        d«      ‚|\  }}|ddik(  r| j                  |«       n$|ddik(  r| j                  |«       nt        d«      ‚d| d<   | j	                  dd «      }|�#|j                  «       D ]  \  }}t        |«       Œ | j	                  d	d «      }|�t        |«       y y )
Nr[   r   z�Invalid input: Type Unions are not supported, except for `Optional` types. Please provide an `Optional` type or a non-Union type.ri   ÚnullTÚnullabler1   r6   )rP   ÚlenÚ
ValueErrorÚupdater>   r6   rR   )rK   r`   ÚaÚbr1   r0   rX   r6   s           r)   rR   rR   ò   sñ   € Ø�J‰J�w Ó%€EØÐÜˆu‹:˜Š?ÜðIóð ð ‰ˆˆ1Ø�˜Ð Ò Ø�M‰M˜!ÕØ�6˜6Ð"Ò"Ø�M‰M˜!ÕäðIóð ð "ˆˆzÑà—‘˜L¨$Ó/€JØÐØ%×+Ñ+Ó-ò 	'‰KˆD�%Ü Õ&ð	'ð �J‰J�w Ó%€EØÐÜ˜EÕ"ð r+   c                ó®  — | €| S | j                  «       } | j                  dd «      }|�|| d<   | j                  dd «      }|�t        |«      | d<   | j                  dd «      }|�|| d<   | j                  dd «      }|�t	        |«      | d<   | j                  dd «      }|�0|j                  «       D ��ci c]  \  }}|t	        |«      “Œ c}}| d<   | S c c}}w )Nri   Útype_ÚformatÚformat_r6   r1   )ÚcopyrP   r>   r*   Ú_rename_schema_fieldsr6   )rK   rs   ru   r6   r1   rJ   Úvs          r)   rw   rw     së   € Ø€~Øˆà�[‰[‹]€Fà�J‰J�v˜tÓ$€EØÐØˆˆw‰Ø�J‰J�w Ó%€EØÐÜ! %›.ˆˆw‰à�j‰j˜ 4Ó(€GØÐØ#ˆˆyÑà�J‰J�w Ó%€EØÐÜ/°Ó6ˆˆw‰à—‘˜L¨$Ó/€JØÐØHR×HXÑHXÓHZ×[ÁÀÀ1 Ô#8¸Ó#;Ñ ;Ó[ˆˆ|Ñà€Mùó  \s   Â2Cc                  ó~   — e Zd Zddœd
d„Zedd„«       Zedd„«       Zedd„«       Zedd„«       Z	dd„Z
eddd	„«       Zy)ÚFunctionDeclarationN©r2   c               óP   — t        j                  ||t        |«      ¬«      | _        y)zmA  class wrapping a `protos.FunctionDeclaration`, describes a function for `genai.GenerativeModel`'s `tools`.©r0   r/   r2   N)r   rz   rw   Ú_proto)Úselfr0   r/   r2   s       r)   Ú__init__zFunctionDeclaration.__init__-  s"   € ä×0Ñ0Ø ;Ô;PÐQ[Ó;\ô
ˆ�r+   c                ó.   — | j                   j                  S r#   )r~   r0   ©r   s    r)   r0   zFunctionDeclaration.name3  s   € à�{‰{×ÑÐr+   c                ó.   — | j                   j                  S r#   )r~   r/   r‚   s    r)   r/   zFunctionDeclaration.description7  s   € à�{‰{×&Ñ&Ð&r+   c                ó.   — | j                   j                  S r#   )r~   r2   r‚   s    r)   r2   zFunctionDeclaration.parameters;  s   € à�{‰{×%Ñ%Ð%r+   c                ó*   —  | ddi ¬«      }||_         |S )NÚ r}   ©r~   )ÚclsÚprotor   s      r)   Ú
from_protozFunctionDeclaration.from_proto?  s   € á˜¨°rÔ:ˆØˆŒØˆr+   c                ó   — | j                   S r#   r‡   r‚   s    r)   Úto_protozFunctionDeclaration.to_protoE  ó   € Ø�{‰{Ðr+   c                óB   — |€i }t        | |¬«      }t        di |¤d| i¤ŽS )aÀ  Builds a `CallableFunctionDeclaration` from a python function.

        The function should have type annotations.

        This method is able to generate the schema for arguments annotated with types:

        `AllowedTypes = float | int | str | list[AllowedTypes] | dict`

        This method does not yet build a schema for `TypedDict`, that would allow you to specify the dictionary
        contents. But you can build these manually.
        )r,   Úfunction© )rL   ÚCallableFunctionDeclaration)r�   r,   rK   s      r)   Úfrom_functionz!FunctionDeclaration.from_functionH  s.   € ð ÐØˆLä! (¸ÔFˆä*ÑG¨VÑG¸hÒGÐGr+   )r0   r%   r/   r%   r2   údict[str, Any] | None)Úreturnr%   )r”   zprotos.Schema)r”   rz   )r”   úprotos.FunctionDeclarationr#   )r�   úCallable[..., Any]r,   zdict[str, str] | None)rB   Ú
__module__Ú__qualname__r€   Úpropertyr0   r/   r2   ÚclassmethodrŠ   rŒ   Ústaticmethodr’   r�   r+   r)   rz   rz   ,  su   „ Ø[_õ 
ð ò ó ð ð ò'ó ð'ð ò&ó ð&ð òó ðó
ð óHó ñHr+   rz   Ú	ValueTypec                  ó@   ‡ — e Zd ZdZddœ	 	 	 	 	 	 	 dˆ fd„Zdd„Zˆ xZS )r‘   z An extension of `FunctionDeclaration` that can be built from a Python function, and is callable.

    Note: The Python function must have type annotations.
    Nr{   c               ó8   •— t         ‰| �  |||¬«       || _        y )Nr}   )Úsuperr€   r�   )r   r0   r/   r2   r�   Ú	__class__s        €r)   r€   z$CallableFunctionDeclaration.__init__h  s    ø€ ô 	‰Ñ˜d°È
ÐÔSØ ˆ�r+   c                ó¤   —  | j                   di |j                  ¤Ž}t        |t        «      sd|i}t	        j
                  |j                  |¬«      S )NÚresult)r0   Úresponser�   )r�   Úargsr$   r3   r   ÚFunctionResponser0   )r   Úfcr¢   s      r)   Ú__call__z$CallableFunctionDeclaration.__call__s  sD   € Ø�—‘Ñ) §¡Ñ)ˆÜ˜&¤$Ô'Ø Ð'ˆFÜ×&Ñ&¨B¯G©G¸fÔEÐEr+   )r0   r%   r/   r%   r2   r“   r�   r–   )r¦   úprotos.FunctionCallr”   zprotos.FunctionResponse)rB   r—   r˜   rD   r€   r§   Ú__classcell__)r    s   @r)   r‘   r‘   b  s@   ø„ ñð -1ñ	!ð ð	!ð ð		!ð
 *ð	!ð %õ	!÷Fr+   r‘   .c                ó   — t        | t        t        j                  f«      r| S t        | t        «      rd| v rt	        di | ¤ŽS t        di | ¤ŽS t        | «      rt        j                  | «      S t        dt        | «      j                  › d�| «      ‚)Nr�   z_Invalid argument type: Expected an instance of `genai.FunctionDeclarationType`. Received type: ú.r�   )
r$   rz   r   r3   r‘   Úcallabler’   Ú	TypeErrorri   rB   )Úfuns    r)   Ú_make_function_declarationr¯   ‚  s£   € ô �#Ô+¬V×-GÑ-GÐHÔIØˆ
Ü	�CœÔ	Ø˜ÑÜ.Ñ5°Ñ5Ð5ä&Ñ-¨Ñ-Ð-Ü	�#ŒÜ*×8Ñ8¸Ó=Ð=äØmÔnrÐsvÓnw÷  oAñ  oAð  nBð  BCð  DØó
ð 	
r+   c                óZ   — t        | t        j                  «      r| S | j                  «       S r#   )r$   r   rz   rŒ   )Úfds    r)   Ú
_encode_fdr²   •  s#   € Ü�"”f×0Ñ0Ô1Øˆ	à�;‰;‹=Ðr+   c                  óH   — e Zd ZdZdd„Zed	d„«       Z	 	 	 	 d
d„Zdd„Zd„ Z	y)ÚToolz\A wrapper for `protos.Tool`, Contains a collection of related `FunctionDeclaration` objects.c                óx  — |D �cg c]  }t        |«      ‘Œ c}| _        i | _        | j                  D ]@  }|j                  }|| j                  v rt	        d«      ‚|| j                  |j                  <   ŒB t        j                  | j                  D �cg c]  }t        |«      ‘Œ c}¬«      | _        y c c}w c c}w )Nr†   ©Úfunction_declarations)	r¯   Ú_function_declarationsÚ_indexr0   rn   r   r´   r²   r~   )r   r·   rE   r±   r0   s        r)   r€   zTool.__init__Ÿ  sž   € àNcÖ&dÈÔ'AÀ!Õ'DÒ&dˆÔ#ØˆŒØ×-Ñ-ò 	&ˆBØ—7‘7ˆDØ�t—{‘{Ñ"Ü  “nÐ$Ø#%ˆD�K‰K˜Ÿ™Ò ð		&ô —k‘kØ<@×<WÑ<WÖ"X°b¤:¨b¥>Ò"Xô
ˆ�ùò 'eùò #Ys   …B2ÂB7c                ó   — | j                   S r#   )r¸   r‚   s    r)   r·   zTool.function_declarations­  s   € à×*Ñ*Ð*r+   c                óX   — t        |t        «      s|j                  }| j                  |   S r#   ©r$   r%   r0   r¹   ©r   r0   s     r)   Ú__getitem__zTool.__getitem__±  ó&   € ô ˜$¤Ô$Ø—9‘9ˆDà�{‰{˜4Ñ Ð r+   c                ó4   — | |   }t        |«      sy  ||«      S r#   )r¬   )r   r¦   Údeclarations      r)   r§   zTool.__call__¹  s    € Ø˜2‘hˆÜ˜Ô$Øá˜2‹Ðr+   c                ó   — | j                   S r#   r‡   r‚   s    r)   rŒ   zTool.to_protoÀ  r�   r+   N)r·   z!Iterable[FunctionDeclarationType])r”   z6list[FunctionDeclaration | protos.FunctionDeclaration]©r0   zstr | protos.FunctionCallr”   ú0FunctionDeclaration | protos.FunctionDeclaration)r¦   r¨   r”   zprotos.FunctionResponse | None)
rB   r—   r˜   rD   r€   r™   r·   r¾   r§   rŒ   r�   r+   r)   r´   r´   œ  s=   „ Ùfó
ð ò+ó ð+ð!Ø-ð!à	9ó!óór+   r´   c                  ó   — e Zd ZU ded<   y)ÚToolDictzlist[FunctionDeclarationType]r·   N©rB   r—   r˜   Ú__annotations__r�   r+   r)   rÆ   rÆ   Ä  s   … Ø8Ô8r+   rÆ   c                óÆ  — t        | t        «      r| S t        | t        j                  «      rt        | j                  ¬«      S t        | t        «      r1d| v rt        di | ¤ŽS | }t        t        j
                  di |¤Žg¬«      S t        | t        «      rt        | ¬«      S 	 t        | g¬«      S # t        $ r)}t        dt        | «      j                  › d�| «      |‚d }~ww xY w)Nr¶   r·   zPInvalid argument type: Expected an instance of `genai.ToolType`. Received type: r«   r�   )r$   r´   r   r·   r3   rz   r   Ú	Exceptionr­   ri   rB   )Útoolr±   Úes      r)   Ú
_make_toolrÍ   Í  sÖ   € Ü�$œÔØˆÜ	�Dœ&Ÿ+™+Ô	&Ü¨$×*DÑ*DÔEÐEÜ	�Dœ$Ô	Ø" dÑ*Ü‘<˜$‘<ÐàˆBÜ¬v×/IÑ/IÑ/OÈBÑ/OÐ.PÔQÐQÜ	�Dœ(Ô	#Ü¨$Ô/Ð/ð	Ü¨t¨fÔ5Ð5øÜò 	ÜØbÔcgÐhlÓcm×cvÑcvÐbwÐwxÐyØóð ðûð	ús   Â!B. Â.	C Â7$CÃC c                  ó6   — e Zd ZdZdd„Z	 	 	 	 dd„Zd	d„Zd„ Zy)
ÚFunctionLibraryzYA container for a set of `Tool` objects, manages lookup and execution of their functions.c                ó  — t        |«      }t        |«      | _        i | _        | j                  D ]U  }|j                  D ]D  }|j
                  }|| j                  v rt        d|› d�«      ‚|| j                  |j
                  <   ŒF ŒW y )Nz2Invalid operation: A `FunctionDeclaration` named 'zI' is already defined. Each `FunctionDeclaration` must have a unique name.)Ú_make_toolsÚlistÚ_toolsr¹   r·   r0   rn   )r   ÚtoolsrË   rÁ   r0   s        r)   r€   zFunctionLibrary.__init__ç  s”   € Ü˜EÓ"ˆÜ˜5“kˆŒØˆŒØ—K‘Kò 	<ˆDØ#×9Ñ9ò <�Ø"×'Ñ'�Ø˜4Ÿ;™;Ñ&Ü$ØLÈTÈFð  S\ð  ]óð ð 1<�—‘˜K×,Ñ,Ò-ñ<ñ	<r+   c                óX   — t        |t        «      s|j                  }| j                  |   S r#   r¼   r½   s     r)   r¾   zFunctionLibrary.__getitem__ô  r¿   r+   c                ó`   — | |   }t        |«      sy  ||«      }t        j                  |¬«      S )N)Úfunction_response)r¬   r   ÚPart)r   r¦   rÁ   r£   s       r)   r§   zFunctionLibrary.__call__ü  s.   € Ø˜2‘hˆÜ˜Ô$Øá˜r“?ˆÜ�{‰{¨XÔ6Ð6r+   c                ó\   — | j                   D �cg c]  }|j                  «       ‘Œ c}S c c}w r#   )rÓ   rŒ   )r   rË   s     r)   rŒ   zFunctionLibrary.to_proto  s    € Ø,0¯K©KÖ8 D�—‘•Ò8Ð8ùÒ8s   �)N)rÔ   zIterable[ToolType]rÃ   )r¦   r¨   r”   zprotos.Part | None)rB   r—   r˜   rD   r€   r¾   r§   rŒ   r�   r+   r)   rÏ   rÏ   ä  s)   „ Ùcó<ð!Ø-ð!à	9ó!ó7ó9r+   rÏ   c                ó4  — t        | t        «      rqt        | t        «      sa| D �cg c]  }t        |«      ‘Œ } }t	        | «      dkD  r9t        d„ | D «       «      r't        | D �cg c]  }|j                  d   ‘Œ c}«      g} | S | }t        |«      gS c c}w c c}w )Nr   c              3  óL   K  — | ]  }t        |j                  «      d k(  –— Œ y­w)r   N)rm   r·   )Ú.0Úts     r)   ú	<genexpr>z_make_tools.<locals>.<genexpr>  s    è ø€ Ò!SÈ¤# a×&=Ñ&=Ó">À!Õ"CÑ!Sùs   ‚"$r   )r$   r   r   rÍ   rm   Úallr·   )rÔ   rÝ   rË   s      r)   rÑ   rÑ     sŠ   € Ü�%œÔ"¬:°e¼WÔ+EØ(-Ö. 1”˜A•Ð.ˆÐ.Üˆu‹:˜Š>œcÑ!SÈUÔ!SÔSäÀUÖ KÀ ×!8Ñ!8¸Ó!;Ò KÓLÐMˆEØˆàˆÜ˜4Ó Ð!Ð!ùò /ùò !Ls   ¥BÁ"Bc                óF   — | €| S t        | t        «      r| S t        | ¬«      S )N)rÔ   )r$   rÏ   )Úlibs    r)   Úto_function_libraryrâ     s&   € Ø
€{Øˆ
Ü	�CœÔ	)Øˆ
ä SÔ)Ð)r+   Ú	mode_autoÚautoÚmode_anyÚanyÚ	mode_noneÚnonec                óT   — t        | t        «      r| j                  «       } t        |    S r#   )r$   r%   r&   Ú_FUNCTION_CALLING_MODEr'   s    r)   Úto_function_calling_moderë   ;  s"   € Ü�!”SÔØ�G‰G‹IˆÜ! !Ñ$Ð$r+   c                  ó"   — e Zd ZU ded<   ded<   y)ÚFunctionCallingConfigDictÚFunctionCallingModeTypeÚmodez	list[str]Úallowed_function_namesNrÇ   r�   r+   r)   rí   rí   A  s   … Ø
!Ó!Ø%Ô%r+   rí   c                ó|  — t        | t        j                  «      r| S t        | t        t        t
        f«      rdt        | «      i} nct        | t        «      r0| j                  «       } | j                  d«      }t        |«      | d<   n#t        dt        | «      j                  › d�| «      ‚t        j                  | «      S )Nrï   zaInvalid argument type: Could not convert input to `protos.FunctionCallingConfig`. Received type: r«   )r$   r   ÚFunctionCallingConfigÚFunctionCallingModer%   Úintrë   r3   rv   rP   r­   ri   rB   )Úobjrï   s     r)   Úto_function_calling_configrö   K  s¨   € Ü�#”v×3Ñ3Ô4Øˆ
Ü	�CÔ-¬s´CÐ8Ô	9ØÔ/°Ó4Ð5‰Ü	�CœÔ	Ø�h‰h‹jˆØ�w‰w�v‹ˆÜ.¨tÓ4ˆˆFŠäðÜ# C›y×1Ñ1Ð2°!ð5àó
ð 	
ô ×'Ñ'¨Ó,Ð,r+   c                  ó   — e Zd ZU ded<   y)ÚToolConfigDictÚFunctionCallingConfigTypeÚfunction_calling_configNrÇ   r�   r+   r)   rø   rø   ^  s   … Ø6Ô6r+   rø   c                ó
  — t        | t        j                  «      r| S t        | t        «      r6| j	                  d«      }t        |«      }|| d<   t        j                  di | ¤ŽS t        dt        | «      j                  › d�«      ‚)Nrú   zVInvalid argument type: Could not convert input to `protos.ToolConfig`. Received type: r«   r�   )	r$   r   Ú
ToolConfigr3   rP   rö   r­   ri   rB   )rõ   Úfccs     r)   Úto_tool_configrþ   e  s‚   € Ü�#”v×(Ñ(Ô)Øˆ
Ü	�CœÔ	Ø�g‰gÐ/Ó0ˆÜ(¨Ó-ˆØ),ˆÐ%Ñ&Ü× Ñ Ñ' 3Ñ'Ð'äðÜ" 3›i×0Ñ0Ð1°ð4ó
ð 	
r+   )r(   ÚTypeOptionsr”   ÚType)rE   r–   r,   zMapping[str, str] | Noner-   zSequence[str] | Noner”   údict[str, Any])rK   r  )r®   ÚFunctionDeclarationTyper”   rÄ   )r±   rÄ   r”   r•   )rË   ÚToolTyper”   r´   )rÔ   Ú	ToolsTyper”   z
list[Tool])rá   zFunctionLibraryType | Noner”   zFunctionLibrary | None)r(   rî   r”   ró   )rõ   rù   r”   zprotos.FunctionCallingConfig)rõ   ÚToolConfigTyper”   zprotos.ToolConfig)LÚ
__future__r   Úcollections.abcr   r   r   r4   Útypingr   r   r	   Útyping_extensionsr
   r<   Úgoogle.generativeair   Úgoogle.generativeai.typesr   r   rô   r%   rÿ   ÚTYPE_UNSPECIFIEDÚSTRINGÚNUMBERÚINTEGERÚBOOLEANÚARRAYÚOBJECTr!   rÈ   r*   rL   rA   rQ   rT   rU   rS   rR   rw   rz   r3   Ú
StructTypeÚfloatÚboolrÒ   rœ   r‘   r  r¯   r²   r´   rÆ   r  rÍ   rÏ   r  rÑ   ÚFunctionLibraryTyperâ   rò   ÚModeró   ÚAUTOÚANYÚNONErê   rî   rë   rí   rù   rö   rø   rü   r  rþ   r�   r+   r)   ú<module>r     s”  ðö #ç 7Ñ 7Û Û ß 'Ñ 'Ý 'ã å &Ý 3à‡{�{€à�C˜˜d�NÑ#€ð'Ø×Ñ˜4×0Ñ0ð'à€t×Ñð'ð ˜×-Ñ-ð'ð �4×(Ñ(ð	'ð
 	‡K�K�—‘ð'ð €t‡{�{ð'ð �4—;‘;ð'ð ˆd�k‰kð'ð 	‡K�K�—‘ð'ð €t‡{�{ð'ð �4—;‘;ð'ð ˆd�k‰kð'ð 	‡L�L�$—,‘,ð'ð €t‡|�|ð'ð �D—L‘Lð'ð  ˆt�|‰|ð!'ð" 	‡L�L�$—,‘,ð#'ð$ €t‡|�|Ø�D—L‘LØˆt�|‰|Ø‡J�J�—
‘
Ø€t‡z�zØ�$—*‘*ØˆT�Z‰ZØ‡K�K�—‘Ø€t‡{�{Ø�4—;‘;Øˆd�k‰kñ9'€
Ð#ó ó@ð .2Ø%)ñ	JØðJð +ðJð #ð	Jð
 óJòZò.òB
ò
+ò
ò#ó<÷8/Hñ /Hðd �#�{Ð"Ñ#€
Ø�%˜˜d J°°[Ñ0AÀ4ÐGÑH€	ôFÐ"5ô Fð0  ØØ
×ÑØˆˆcˆ�NØˆS�#ˆXÑðñÐ ð
Ø	 ð
à5ó
ó&÷%ñ %ôP9ˆyô 9ð Øˆ&�+‰+�x Ð*AÑ!BÐD[Ð[ñ€ó
÷.!9ñ !9ðH �(˜8Ñ$ hÐ.Ñ/€	ó	"ð ˜O¨YÐ6Ñ7Ð ó*ð ×2Ñ2×7Ñ7Ð ð Ð×ÑØ×ÑÐ1×6Ñ6ØÐ$×)Ñ)Ø
Ð×$Ñ$àÐ×ÑØ×ÑÐ0×4Ñ4ØÐ#×'Ñ'Ø	Ð×"Ñ"àÐ×ÑØ×ÑÐ1×6Ñ6ØÐ$×)Ñ)Ø
Ð×$Ñ$ðÐ ð$  Ð 3°S¸#Ð =Ñ>Ð ó%ô& 	ô &ð
 "ØÐ6¸×8TÑ8TÐTñÐ ó
-÷&7ñ 7ð �~ v×'8Ñ'8Ð8Ñ9€ô
r+   