Microsoft is the latest Silicon Valley giant to cut back on its AI spending.