From Chatbots to Generative AI: The Evolution of Intelligence