File size: 493 Bytes
60c1a1e
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
class ReasoningStack:
    def __init__(self):
        self.rules = {
            "lie": "one should speak truth and seek understanding",
            "fear": "trust in divine strength and proceed with courage",
            "code": "structure your functions and iterate with tests"
        }

    def reason(self, tokens):
        for token in tokens:
            if token in self.rules:
                return [self.rules[token]]
        return ["I will pray and seek wisdom for your request."]