def uc_function_to_openai_function_definition(
        *,
        function_name: str,
        client: Optional[BaseFunctionClient] = None,
        filter_accessible_functions: bool = False,
    ) -> Optional[ChatCompletionToolParam]:
        """
        Convert a UC function to OpenAI function definition.

        Args:
            function_name: The full name of the function in the form of 'catalog.schema.function'
            client: The client for managing functions, must be an instance of BaseFunctionClient
        """
        client = validate_or_set_default_client(client)

        if function_name is None:
            raise ValueError("function_name must be provided.")
        try:
            function_info = client.get_function(function_name)
        except PermissionError as e:
            _logger.info(f"Skipping {function_name} due to permission errors.")
            if filter_accessible_functions:
                return None
            raise e

        function_input_params_schema = generate_function_input_params_schema(
            function_info, strict=True
        )
        tool = pydantic_function_tool(
            function_input_params_schema.pydantic_model,
            name=get_tool_name(function_name),
            description=function_info.comment or "",
        )
        # strict is set to true only if all params are supported JSON schema types
        tool["function"]["strict"] = function_input_params_schema.strict
        return tool

        Convert a UC function to OpenAI function definition.

        Args:
            function_name: The full name of the function in the form of 'catalog.schema.function'
            client: The client for managing functions, must be an instance of BaseFunctionClient
        
ai/integrations/openai/src/unitycatalog/ai/openai/toolkit.py