If you write code, you might be aware of the AI coding assistants out there. Most notable is probably Github's Copilot. Well, that AI assistant has an ongoing case against it to answer the question you're asking. So, just like you add a GPL (or other) license to your code, creative commons licenses are for text and media that aren't code and I add it to my comments.
Whether they will have an impact has yet to be determined, so we'll see if creative commons with a non-commercial clause is for naught or not.