New York City writes bill to rein in AI while insisting it wants to be the ‘AI capital of the world’