If I used a chatbot to sell the entire text of harry potter, all at once, that would still be illegal even though its through a chatbot.
Whats legal, of course, is creating transformative content, learning from other content, and mostly creating entirely new works even if you learned/trained from other content about how to do that. Or even if there are some similarities, or even if there were verbatim "copies" of full sentences like "he opened the door" that were "taken" from the original works!
Copyright law in the USA has never disallowed you entirely from ever using other people's works, in all circumstances. There are many exceptions.