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:
@ -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]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
2
main.py
2
main.py
@ -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 = {
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user