Microsoft says it is making a "multiyear, multibillion dollar investment" in the artificial intelligence startup OpenAI, maker of ChatGPT and other tools that can write readable text and generate new images.