No, ChatGPT isn’t AI in that sense. It can fire back documentation at you, but a lot of what it does is just look at the word it’s spit out, and pick the next word or snippet that looks right. Same thing with code. It just spits out what it’s trained to interpolate the next snippet to be.
Anything involving genuine reasoning needs to be done by a human. It’s a great documentation parser. A step up in search engines. But a thinking machine it is not (yet).