Update personality.py

This commit is contained in:
Saifeddine ALOUI 2024-07-10 17:24:52 +02:00 committed by GitHub
parent 223fbefb9c
commit b670912834
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1739,10 +1739,10 @@ class AIPersonality:
bool: True if any antiprompt is found in the text (ignoring case), False otherwise.
"""
start_header_id_template = self.config.start_header_id_template
end_header_id_template = self.config.end_header_id_template
separator_template = self.config.separator_template
start_user_header_id_template = self.config.start_user_header_id_template
start_ai_header_id_template = self.config.start_ai_header_id_template
anti_prompts = [start_header_id_template, self.app.config.discussion_prompt_separator]
anti_prompts = [start_header_id_template, start_user_header_id_template, start_ai_header_id_template]
if self.app.config.separator_template!="\n":
anti_prompts.append(self.app.config.separator_template)