In the continually evolving realm of software engineering, the advent of Artificial Intelligence (AI) and its implications for automating traditionally laborious tasks has been of paramount interest. This study employs the GPT-3 model, a transformative AI architecture, in automating the extraction of class diagram elements from textual software requirements - a critical yet often complex task in object-oriented programming. GPT-3 was equipped to execute this task proficiently through model fine-tuning using tailored case studies. Our approach emphasized the few-shot learning technique, a proven effective method in enhancing the model's proficiency in specialized tasks. The developed tool, ClassDiagGen, was subjected to thorough testing and evaluation, showcasing exemplary performance with average precision and recall scores of 98.6% and 93.3%, respectively. Our findings underscore the profound potential of AI, particularly the GPT-3 model, in streamlining software development processes while highlighting the importance of customized model training. This study marks the beginning of an exciting journey, with the software engineering landscape poised for further transformative changes through AI integration.