blob: 89ae755904b14c00e2f4ab05c4ec225300b8817c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
import click
from dotenv import load_dotenv
from loguru import logger as log
from rag.retriever.retriever import Retriever
def drop():
log.debug("Dropping documents")
retriever = Retriever()
doc_db = retriever.doc_db
doc_db.delete_all()
vec_db = retriever.vec_db
vec_db.delete_collection()
@click.confirmation_option(prompt="Are you sure you want to drop the db?")
def main():
drop()
if __name__ == "__main__":
load_dotenv()
main()
|