diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2024-04-24 23:36:58 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2024-04-24 23:36:58 +0200 |
commit | fd635eb8e61c18d7dbe4d430e2e3eeb4a1755947 (patch) | |
tree | 3860127c5f456e79c739e67a2754580bd77cc03b /rag/drop.py | |
parent | 7fcb7489401bd3f4d2fb84b758388d06a703b5be (diff) |
Refactor cli
Diffstat (limited to 'rag/drop.py')
-rw-r--r-- | rag/drop.py | 25 |
1 files changed, 0 insertions, 25 deletions
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() |