This commit is contained in:
Saifeddine ALOUI 2024-07-05 07:02:43 +02:00
parent 971b4e89cd
commit 5fc9e91eb4

View File

@ -2817,8 +2817,8 @@ class APScript(StateMachine):
prompt = self.build_prompt(full_context, sacrifice_id)
if self.config.debug:
nb_prompt_tokens = self.personality.model.tokenize(prompt)
nb_tokens = min(self.config.ctx_size - len(nb_prompt_tokens), self.config.max_n_predict)
nb_prompt_tokens = len(self.personality.model.tokenize(prompt))
nb_tokens = min(self.config.ctx_size - nb_prompt_tokens, self.config.max_n_predict)
ASCIIColors.info(f"Prompt size : {nb_prompt_tokens}")
ASCIIColors.info(f"Requested generation max size : {nb_tokens}")