mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Fix for probability bug
This commit is contained in:
@@ -948,6 +948,7 @@ class KoboldStoryRegister(object):
|
|||||||
old_length = self.actions[action_step]["Selected Text Length"]
|
old_length = self.actions[action_step]["Selected Text Length"]
|
||||||
if option_number < len(self.actions[action_step]['Options']):
|
if option_number < len(self.actions[action_step]['Options']):
|
||||||
self.actions[action_step]["Selected Text"] = self.actions[action_step]['Options'][option_number]['text']
|
self.actions[action_step]["Selected Text"] = self.actions[action_step]['Options'][option_number]['text']
|
||||||
|
if 'Probabilities' in self.actions[action_step]['Options'][option_number]:
|
||||||
self.actions[action_step]["Probabilities"] = self.actions[action_step]['Options'][option_number]['Probabilities']
|
self.actions[action_step]["Probabilities"] = self.actions[action_step]['Options'][option_number]['Probabilities']
|
||||||
if self.tokenizer is not None:
|
if self.tokenizer is not None:
|
||||||
self.actions[action_step]['Selected Text Length'] = len(self.tokenizer.encode(self.actions[action_step]['Options'][option_number]['text']))
|
self.actions[action_step]['Selected Text Length'] = len(self.tokenizer.encode(self.actions[action_step]['Options'][option_number]['text']))
|
||||||
|
Reference in New Issue
Block a user