Back in the 80s, I had a Commodore 64 computer and spent hours learning BASIC, playing games and writing my own programs. There were many books and magazines around at the time that provided BASIC code that could be typed in and run as programs.
One such book was called More Basic Computer Games. It was published by Creative Computing Press, Morris Plains, New Jersey and contained 84 games that could be played on a personal computer. One of the games, well programs really, was called ELIZA.
ELIZA was an artificial psychotherapist chat bot based on the techniques of Carl Rogers. Text could be entered, interpreted (to some extent) and a computer generated response would be provided, simulating a conversation. Admittedly you needed to do most of the talking, but it was quite impressive in its time.