Just a few weeks ago, the stock market stumbled over fears that artificial intelligence stocks might be in a bubble. Now stocks are back within reach of a record high.