The release of software that can generate virtually text and images, exemplified by ChatGPT, a chatbot from the startup OpenAI, has set off a race to integrate AI into more products and for investors to bet on which company will emerge on top.