mitulagr2 commited on
Commit
8bf6a65
1 Parent(s): 3e9ee7c

fix collection clear

Browse files
Files changed (1) hide show
  1. app/rag.py +5 -6
app/rag.py CHANGED
@@ -107,9 +107,8 @@ class ChatPDF:
107
  return streaming_response
108
 
109
  def clear(self):
110
- if self.doc_ids:
111
- self.client.delete(collection_name="rag_documents", points_selector=self.doc_ids)
112
- self.pdf_count = 0
113
- self.text_chunks = []
114
- self.doc_ids = []
115
- self.nodes = []
 
107
  return streaming_response
108
 
109
  def clear(self):
110
+ self.client.delete_collection(collection_name="rag_documents")
111
+ self.pdf_count = 0
112
+ self.text_chunks = []
113
+ self.doc_ids = []
114
+ self.nodes = []