Chatbot WIP
This commit is contained in:
@@ -1,12 +1,31 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Kommentar Test
|
# Kommentar Test
|
||||||
|
import random
|
||||||
|
|
||||||
print ("Hallo! Willkommen bei MikaGPT. Was kann ich für Sie tun?")
|
print ("Hallo! Willkommen bei MikaGPT. Was kann ich für Sie tun?")
|
||||||
uinput = (input("Bitte Eingabe beginnen ").lower().split())
|
|
||||||
|
|
||||||
|
woerter = {
|
||||||
|
"test": "bro... dies ist ein Test",
|
||||||
|
}
|
||||||
|
|
||||||
while uinput:
|
zwoerter = ["Oh, wirklich?", "Nuh uh"]
|
||||||
|
|
||||||
|
while True:
|
||||||
|
uinput = (input("Bitte Eingabe beginnen ").lower().split())
|
||||||
if "bye" in uinput:
|
if "bye" in uinput:
|
||||||
print("MikaGPT wird nun beendet.")
|
print("MikaGPT wird nun beendet.")
|
||||||
break
|
break
|
||||||
|
|
||||||
|
randoma = set(uinput).isdisjoint(set(woerter))
|
||||||
|
|
||||||
|
if randoma == True:
|
||||||
|
print (random.choice(zwoerter))
|
||||||
|
|
||||||
|
for antworten in uinput:
|
||||||
|
if antworten in woerter:
|
||||||
|
(woerter[antworten])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# if uinput not in zwoerter:
|
||||||
|
# print (random.choice(woerter))
|
||||||
|
|||||||
Reference in New Issue
Block a user