A work of fiction can count as prior art? It is not like anyone would not have tried to do something similar in practice, before or after that, but the episode itself?
In any case, that episode qualifies both as prior, and art.
The claims of this patent recite a chat bot system that does specific things a certain way. If it does require a particular algorithm, the algorithm itself is not protected.