ChatGPT is pretty good at writing code but CoPilot is so much better. Copilot uses GPT to do it but is way better integrated into the IDE like vscode. I just used it in an interview but I asked first.