def to_inference_tool(metadata: Type[BaseModel]) -> Dict[str, Any]:
    """
    Converts a tool metadata to a tool dict for Azure AI model inference.

    Args:
        tool_metadata (Type[ToolMedata]): The metadata of the tool to convert.

    Returns:
        Dict[str, Any]: The converted tool dict.

    """
    return {
        "type": "function",
        "function": {
            "name": metadata.name,
            "description": metadata.description,
            "parameters": metadata.get_parameters_dict(),
        },
    }

    Converts a tool metadata to a tool dict for Azure AI model inference.

    Args:
        tool_metadata (Type[ToolMedata]): The metadata of the tool to convert.

    Returns:
        Dict[str, Any]: The converted tool dict.

    
llama-index-integrations/llms/llama-index-llms-azure-inference/llama_index/llms/azure_inference/base.py