Samsung is in talks with Perplexity AI to potentially integrate its AI assistant into its smartphones, posing a challenge to Google's Gemini.