Apple is to boost its Siri voice assistant and operating systems with OpenAI's ChatGPT as it seeks to catch up in the AI race.