This was a very famous early attempt on the Turing Test.
Eliza was a talk-bot which attempted to emulate a conversation as a pyschiatrist. It would latch on to key words, and reel off programmed responses- sometimes substituting your own words. It woudl ask questions like "how do you feel about your mother?" and occasionally bring up a subject earlier in the discussion.
Recent implmentations include Alice. If you are a Unix user - Emacs has a few of these :
Indeed you can actually tell it to "pyschoanalyse-pinhead" and watch the swearing robot and pyscho-analysis bot chat to each other.
It is not quite artificial Intelligence, but can be quite amusing.
Time to build your own robot! Using a Raspberry Pi with parts and some time, you can use my book to learn how to make and program a robot with automatic behaviours.