Correction d'une typo, correction dans le main d'un problème d'attribut lorsque evaluate n'etait pas appelé et ajout d'un indicateur pour la fonction add de la pipeline montrant quels documents sont ajoutés à la BDD.

This commit is contained in:
2025-11-14 15:58:31 +01:00
parent f94c7d4086
commit 81fdec1c32
3 changed files with 3 additions and 3 deletions

View File

@ -39,7 +39,7 @@ def create_parser():
subparsers.add_parser( subparsers.add_parser(
"add", "add",
help="Add the documents to the databaser", help="Add the documents to the database",
parents=[path_arg_parent] parents=[path_arg_parent]
) )

View File

@ -32,7 +32,7 @@ def main():
source_path = getattr(args, "path", DEFAULT_SOURCE_PATH) or DEFAULT_SOURCE_PATH source_path = getattr(args, "path", DEFAULT_SOURCE_PATH) or DEFAULT_SOURCE_PATH
documents_path = get_files_in_directory(source_path=source_path) documents_path = get_files_in_directory(source_path=source_path)
eval_path = args.eval_file if args.eval_file else DEFAULT_EVAL_PATH eval_path = getattr(args, "eval_file", DEFAULT_EVAL_PATH) or DEFAULT_EVAL_PATH
sample_questions = json.load(open(eval_path, "r")) sample_questions = json.load(open(eval_path, "r"))
commands = { commands = {

View File

@ -23,7 +23,7 @@ class RAGpipeline:
def add_documents(self, documents_path : List[str]) -> None: def add_documents(self, documents_path : List[str]) -> None:
items = self.indexer.index(documents_path) items = self.indexer.index(documents_path)
#print(f"🔍 Adding documents: {', '.join(docu)}") print(f"🔍 Adding documents: {documents_path}")
self.datastore.add_items(items= items) self.datastore.add_items(items= items)
return return