What are generative (and discriminative) models?
If the model learns a distribution of the form $p(x)$ or $p(x, y)$, where $x$ are the inputs and $y$ the outputs/labels, from which you can sample data, then it's a generative model. An example of a generative model: variational autoencoder (VAE).
Bishop also defines generative models in this way (p. 43)
Approaches that explicitly or implicitly model the distribution of
inputs as well as outputs are known as generative models, because by sampling from them it is possible to generate synthetic data points in the input space
If it learns a distribution of the form $p(y \mid x)$, then it's a discriminative model - many/most classifiers learn this distribution, but you can also derive the conditional given the the joint and prior (that's why above Bishop uses implicitly or explicitly).
Bishop also defines discriminative models in this way (p. 43)
Approaches that model the posterior probabilities directly
are called discriminative models
The related Wikipedia article claims that people have not always been using these terms consistently (which is common in machine learning), so one should always keep that in mind.
GPTs are autoregressive
As far as I know, GPTs are autoregressive models. Here is another potentially useful post that explains what autoregressive models are.
My understanding of autoregressive models, at least based on neural networks, is that they are also generative models - the linked articles and even the GPT-2 paper seem to start the descriptions from the assumption that you can factorize some joint distribution like $p(x)$ into conditional distributions.
ChatGPT is based on a GPT model, so it's probably considered a generative model too, but there are several steps involved to create this model, so it may not be super clear how to categorise this model.
Moreover, the authors of the transformer, which GPT models are based on, claim that the transformer is an autoregressive model.
It seems to me that many people in ML refer to any model that generates data as a generative model, even if there's no written theoretical formulation of it as a generative model, which doesn't mean that you cannot formulate these models as generative models, i.e. a model that learns some distribution that you can use to sample data from data distribution.
I am currently not familiar enough with the details of the GPT models to say if they have been mathematically formulated as generative models of the form $p(x, y)$, but they model some distribution of the form $p(x)$, from which you can sample, otherwise, how could you even sample data (words)?