Lagging consumer spending and business investment offset the boost from strong exports thanks partly to the boom in artificial intelligence.