Every time there is a major shift in tech you see this pattern repeat but I don't recall seeing it on that scale again since ~2000, even though lots of stuff has happened since then (for instance: the mobile revolution).
Investing in AI for the sake of companies using AI because it increases their chances of funding is the hallmark of a bubble, and that will probably end the same way it did before. But if you manage to pick the winners early it will pay off in spades. The big question to me is whether or not those winners will be part of the first wave or the second, usually it takes a while before a new technology really comes into its strength.
Until then there is a pretty big risk that what looks to be an early winner will be displaced by a party from the second wave which is better positioned to take advantage of later, more mature versions of that technology, which by then may well be able to displace those 'early winners' by a couple of guys with an open source package.
Not an easy time to be an investor.