def get_client()

in dell_ai/cli/utils.py [0:0]


def get_client(token: Optional[str] = None) -> DellAIClient:
    """
    Create and return a DellAIClient instance.

    Args:
        token: Optional Hugging Face API token. If not provided, will attempt to load
              from the Hugging Face token cache.

    Returns:
        A configured DellAIClient instance

    Raises:
        SystemExit: If authentication fails
    """
    try:
        return DellAIClient(token=token)
    except AuthenticationError as e:
        print_error(str(e))