added conditionning for document chunk

This commit is contained in:
Saifeddine ALOUI 2024-01-22 23:12:11 +01:00
parent d299727a21
commit 58e2690b9a
2 changed files with 3 additions and 3 deletions

View File

@ -767,7 +767,7 @@ class LOLLMSWebUI(LOLLMSElfServer):
if generation_type != "simple_question": if generation_type != "simple_question":
if self.personality.persona_data_vectorizer: if self.personality.persona_data_vectorizer:
if documentation=="": if documentation=="":
documentation="!@>Documentation:\n" documentation="\n!@>important information: Use the documentation data to answer the user questions. If the data is not present in the documentation, please tell the user that the information he is asking for does not exist in the documentation section. It is strictly forbidden to give the user an answer without having actual proof from the documentation.\n!@>Documentation:\n"
if self.config.data_vectorization_build_keys_words: if self.config.data_vectorization_build_keys_words:
discussion = self.recover_discussion(client_id)[-512:] discussion = self.recover_discussion(client_id)[-512:]
@ -784,7 +784,7 @@ class LOLLMSWebUI(LOLLMSElfServer):
if len(self.personality.text_files) > 0 and self.personality.vectorizer: if len(self.personality.text_files) > 0 and self.personality.vectorizer:
if documentation=="": if documentation=="":
documentation="!@>Documentation:\n" documentation="\n!@>important information: Use the documentation data to answer the user questions. If the data is not present in the documentation, please tell the user that the information he is asking for does not exist in the documentation section. It is strictly forbidden to give the user an answer without having actual proof from the documentation.\n!@>Documentation:\n"
if self.config.data_vectorization_build_keys_words: if self.config.data_vectorization_build_keys_words:
discussion = self.recover_discussion(client_id)[-512:] discussion = self.recover_discussion(client_id)[-512:]

@ -1 +1 @@
Subproject commit 8f35a3c92074018979813ee617beb4bf1780126a Subproject commit d4452148977ec1c30d31988e7ea6c8b25d5fb09e