Well, chat gpt is a language model so it can only talk like a doctor. It's based on the gpt3 learning model. If it studies millions of diagnoses it can diagnose like a doctor too. Gtp3 is already obsolete btw as gpt4 is almost done.