Google is working on the latter called LaMDA[1] which is arguably more impressive and extensive than GPT-3, but for the reasons discussed above can't just be rolled out to the public. (edit: as others have noted, the code snippets themselves are wrong, but the Twitter poster didn't verify this because they're not interested in the answer, just the lack of one from Google).
It's certainly an interesting discussion for sure. Mathematics help (homework) is being built into search presently and one day for sure code-snippets will be embedded on search. However at Google's scale and the amount of scrutiny it receives spitting out machine-learning based results without any curation or substantiation is dangerous. Legally it is much safer to delegate to websites, thus alleviating any blame to the host.