The public needs to be consulted when developing legislation to regulate artificial intelligence