Apple is quietly working on artificial intelligence tools that could challenge those of OpenAI, Alphabet’s Google and others, but the…