From 069f46518da35c4a3028a4eacf70c6aba07290f0 Mon Sep 17 00:00:00 2001 From: HITANSHU SINGH <122127354+2002hitanshu@users.noreply.github.com> Date: Thu, 31 Oct 2024 20:33:08 +0530 Subject: [PATCH] Create chatterbot.py --- chatterbot.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 chatterbot.py diff --git a/chatterbot.py b/chatterbot.py new file mode 100644 index 0000000..160b413 --- /dev/null +++ b/chatterbot.py @@ -0,0 +1,13 @@ +# bot.py + +from chatterbot import ChatBot + +chatbot = ChatBot("Chatpot") + +exit_conditions = (":q", "quit", "exit") +while True: + query = input("> ") + if query in exit_conditions: + break + else: + print(f"🪴 {chatbot.get_response(query)}")