mitulagr2 commited on
Commit
20f2e68
1 Parent(s): 8bf6a65

Update rag.py

Browse files
Files changed (1) hide show
  1. app/rag.py +2 -1
app/rag.py CHANGED
@@ -107,7 +107,8 @@ class ChatPDF:
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 = []
 
107
  return streaming_response
108
 
109
  def clear(self):
110
+ for id in self.doc_ids:
111
+ self.vector_store.delete(id)
112
  self.pdf_count = 0
113
  self.text_chunks = []
114
  self.doc_ids = []