This commit is contained in:
Saifeddine ALOUI 2024-07-05 06:53:01 +02:00
parent 593cb24671
commit 971b4e89cd

View File

@ -2818,7 +2818,7 @@ class APScript(StateMachine):
if self.config.debug:
nb_prompt_tokens = self.personality.model.tokenize(prompt)
nb_tokens = min(self.config.ctx_size - nb_prompt_tokens, self.config.max_n_predict)
nb_tokens = min(self.config.ctx_size - len(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}")