AI and public law: risks, duties and compliance