what it does is, generate a positive or negative reply to agreement or disagreement of an agenda.
the code can be used as boiler plate, but what it goes to show is, that interaction between disagreeing parties
can result in separation, while advancing affiliation with agreeing parties.
the code can be used as boiler plate, but what it goes to show is, that interaction between disagreeing parties
can result in separation, while advancing affiliation with agreeing parties.
Code:
class DiJokerV2(DiJoker):
def __init__(self):
super().__init__()
self.prompt: Prompt = Prompt()
self.prompt.setRegex("yes|no")
self.promptActive: bool = False
self.funnel: AXFunnel = AXFunnel()
self.funnel.addKV("i agree", "yes")
self.funnel.addKV("i disagree", "no")
self.responterY:Responder = Responder("based", "good","nice")
self.responterN: Responder = Responder("hmph", "i don't have to take this, i am going home", "lame")
def input(self, ear: str, skin: str, eye: str):
if self.promptActive:
# answer = self.answersFunnel.funnel(ear)
answer = self.funnel.funnel(ear)
if not self.prompt.process(answer):
self.promptActive = False
if answer == "yes":
self.setSimpleAlg(self.responterY.getAResponse())
return
elif answer == "no":
self.setSimpleAlg(self.responterN.getAResponse())
return
if self.trg.engageCommand(ear):
self.setSimpleAlg(self.chatbot.talk())
self.promptActive = True