The company plans to allocate a record amount to capital expenditures to build artificial-intelligence infrastructure.