debug text for troubleshooting

This commit is contained in:
ebolam
2022-09-22 12:31:40 -04:00
parent 2f31958b5b
commit 7a83c38bec

View File

@@ -156,7 +156,16 @@ class koboldai_vars(object):
#we're going to split our actions by sentence for better context. We'll add in which actions the sentence covers. Prompt will be added at a -1 ID
actions = {i: self.actions[i] for i in range(len(self.actions))}
actions[-1] = self.prompt
action_text = self.prompt + str(self.actions)
try:
action_text = self.prompt + str(self.actions)
except:
print("=====================DEBUG=======================")
print(self.prompt)
print(str(self.actions))
print("=====================END DEBUG=======================")
print()
print()
raise
###########action_text_split = [sentence, actions used in sentence, token length, included in AI context]################
action_text_split = [[x+" ", [], 0 if self.tokenizer is None else len(self.tokenizer.encode(x+" ")), False] for x in re.split("(?<=[.!?])\s+", action_text)]
#The last action shouldn't have the extra space from the sentence splitting, so let's remove it