From fd635eb8e61c18d7dbe4d430e2e3eeb4a1755947 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Wed, 24 Apr 2024 23:36:58 +0200 Subject: Refactor cli --- rag/drop.py | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 rag/drop.py (limited to 'rag/drop.py') diff --git a/rag/drop.py b/rag/drop.py deleted file mode 100644 index 5ff5983..0000000 --- a/rag/drop.py +++ /dev/null @@ -1,25 +0,0 @@ -import click -from dotenv import load_dotenv -from loguru import logger as log - -from rag.retriever.retriever import Retriever - - -def drop(): - log.debug("Deleting all data...") - retriever = Retriever() - doc_db = retriever.doc_db - doc_db.delete_all() - vec_db = retriever.vec_db - vec_db.delete_collection() - - -@click.command() -@click.confirmation_option(prompt="Are you sure you want to drop the db?") -def main(): - drop() - - -if __name__ == "__main__": - load_dotenv() - main() -- cgit v1.2.3-70-g09d2