Its already here, it's called chatgpt and it's in the early stages. However, even if you can get an ai to write a novel, chances are you're going to have to edit the hell out of it to make it readable.