Torchtext min_freq: unexpected argument

My torch version is 1.10.2, and torchtext version is 0.11.2. The error I am getting is from this statement:
vocab = torchtext.vocab.Vocab(counter, min_freq=1)

Error: TypeError: init() got an unexpected keyword argument ‘min_freq’. torchtext is the latest version, so what could the problem be?

you should use

vocab = torchtext.vocab.vocab(counter, min_freq=1)

please make sure not the Vocab.