Code:
class DiAbsorbed(DiSkillV2):
def __init__(self):
super().__init__()
self._apikey: str = ""
with open('open_ai_apikey.txt', 'r') as f:
self._apikey = f.read()
self.ai = AIChat(api_key=self._apikey, console=False, character="potato",
character_command="you are slav potato, never end your replies with a question")
self.dialog: AXCmdBreaker = AXCmdBreaker("over")
self._err = False
def input(self, ear: str, skin: str, eye: str):
if len(ear) == 0 or self._err:
return
try:
temp = self.dialog.extractCmdParam(ear)
if temp:
self.setSimpleAlg(self.ai(temp))
except:
self._err = True
adding the skill:
chobit.addSkill(DiAbsorbed())
to engage the skill end your input with over.
it is coded this way so she won't blab non stop like Neuro-Sama does.