Microsoft is making a multibillion-dollar investment in OpenAI, bolstering its relationship with the startup behind the viral ChatGPT chatbot as the software giant looks to expand the use of artificial intelligence in its products.