Is this legal? Throwing all open-source codebases into the AI meat grinder...

Isn't this a usage of Open-source projects to train AI to generate these docs and is this legal?

Any thoughts about DeepWiki?