proper test procedure :
notice adding a skill is just 1 line of code :
super().getdClassesLv1().append(DiHelloWorld(self.getKokoro()))
that is the livingrimoire design pattern
Python:
class DiHelloWorld(DiSkillV2):
def __init__(self, kokoro: Kokoro):
DiSkillV2.__init__(self, kokoro)
# Override
def input(self, ear: str, skin: str, eye: str):
if ear == "hello":
self._outAlg = self._diSkillUtils.simpleVerbatimAlgorithm("test", "hello world")
class Personality1(Personality):
# Override
def __init__(self, *absDictionaryDB: AbsDictionaryDB):
super().__init__(absDictionaryDB)
super().getdClassesLv1().append(DiHelloWorld(self.getKokoro()))
if __name__ == "__main__":
test_personality: Personality1 = Personality1()
chii: ChobitV2 = ChobitV2(test_personality)
result = chii.think("hello", "", "")
print(result)
notice adding a skill is just 1 line of code :
super().getdClassesLv1().append(DiHelloWorld(self.getKokoro()))
that is the livingrimoire design pattern