If you want to learn vocabulary efficiently then spaced repetition is still superior.
For grammar I still prefer a textbook.
And then it’s a lot more fun to practice with other humans.
How would that work?
An AI could probably gauge your foreign language knowledge level with a conversation, slowly introduce new words to try and teach you lessons, and could probably figure out exactly when you need to a refresher of the old material. That seems like a pretty decent basis for learning a new language.
An AI could do that in the future maybe — maybe in the very near future, who knows how fast things will develop? — but it seems beyond the current capabilities of ChatGPT.