mitulagr2 commited on
Commit
6a0c286
1 Parent(s): eedf7c7

Update app/rag.py

Browse files
Files changed (1) hide show
  1. app/rag.py +8 -7
app/rag.py CHANGED
@@ -107,10 +107,11 @@ class ChatPDF:
107
  return streaming_response
108
 
109
  def clear(self):
110
- # self.vector_store.clear()
111
- if self.nodes:
112
- self.vector_store.delete_nodes(self.nodes)
113
- self.pdf_count = 0
114
- self.text_chunks = []
115
- self.doc_ids = []
116
- self.nodes = []
 
 
107
  return streaming_response
108
 
109
  def clear(self):
110
+ self.vector_store = QdrantVectorStore(
111
+ client=self.client,
112
+ collection_name="rag_documents",
113
+ )
114
+ self.pdf_count = 0
115
+ self.text_chunks = []
116
+ self.doc_ids = []
117
+ self.nodes = []