If you ask it to "write code to do X", then it will say that it can't write code. I think this was hardcoded.
But I asked Bard: "Can you implement fibonacci in Go", and it outputted valid code. And then I asked it "what if I wanted to avoid recursion", to which it replied with valid Go code that used a for loop. But it also suggested me another very bogus way of doing it, by using a "function pointer", which was very bad. F(x) would output x.
So, don't expect ChatGPT level of quality just yet, but I think it will get there pretty fast.
But I asked Bard: "Can you implement fibonacci in Go", and it outputted valid code. And then I asked it "what if I wanted to avoid recursion", to which it replied with valid Go code that used a for loop. But it also suggested me another very bogus way of doing it, by using a "function pointer", which was very bad. F(x) would output x.
So, don't expect ChatGPT level of quality just yet, but I think it will get there pretty fast.