def convert_to_gemini_schema(function_info: PydanticFunctionInputParams, strict: str = True):
        """
        Converts Unity Catalog function metadata into a Gemini-compatible schema.

        Args:
            function_info (PydanticFunctionInputParams):
                The input parameter metadata of the UC function.
            strict (bool):
                Indicates whether to enforce strict typing rules in parameter conversion.

        Returns:
            Dict[str, Any]: A dictionary containing the Gemini-compatible function schema.
        """

        fields_dict = {}
        param_infos = function_info.input_params.parameters
        if param_infos is None:
            raise ValueError("Function input parameters are None.")

        for param_info in param_infos:
            pydantic_field = param_info_to_pydantic_type(param_info, strict=strict)
            fields_dict[param_info.name] = (
                pydantic_field.pydantic_type,
                Field(description=pydantic_field.description),
            )

        parameters = content_types._build_schema(function_info.name, fields_dict)

        parameters["required"] = [
            k.name
            for k in param_infos
            if (
                k.parameter_default is None
                and (
                    k.parameter_type is None or getattr(k.parameter_type, "value", None) == "PARAM"
                )
            )
        ]
        schema = dict(name=function_info.name, description=function_info.comment)
        if parameters["properties"]:
            schema["parameters"] = parameters
        return schema

        Converts Unity Catalog function metadata into a Gemini-compatible schema.

        Args:
            function_info (PydanticFunctionInputParams):
                The input parameter metadata of the UC function.
            strict (bool):
                Indicates whether to enforce strict typing rules in parameter conversion.

        Returns:
            Dict[str, Any]: A dictionary containing the Gemini-compatible function schema.
        
ai/integrations/gemini/src/unitycatalog/ai/gemini/toolkit.py