In fact, not only is thanking useless, and borderline harmful, but any kind of pleasantries are.
Not only is there no logical reason to add pleasantries to your chat with GPT, but it also takes tokens for it to remove them and get to the point of your message.