Spaces:
Build error
Build error
Update ragagent.py
Browse files- ragagent.py +1 -1
ragagent.py
CHANGED
|
@@ -96,7 +96,7 @@ class RAGAgent():
|
|
| 96 |
doc_splits = text_splitter.split_documents(docs_list)
|
| 97 |
embedding_function = SentenceTransformerEmbeddings(model_name="all-MiniLM-L6-v2")
|
| 98 |
|
| 99 |
-
collection_name = re.sub(r'[^a-zA-Z0-9]', '',
|
| 100 |
|
| 101 |
try:
|
| 102 |
# If it exists, delete the existing collection
|
|
|
|
| 96 |
doc_splits = text_splitter.split_documents(docs_list)
|
| 97 |
embedding_function = SentenceTransformerEmbeddings(model_name="all-MiniLM-L6-v2")
|
| 98 |
|
| 99 |
+
collection_name = re.sub(r'[^a-zA-Z0-9]', '', doc_splits[0].metadata.get('source'))
|
| 100 |
|
| 101 |
try:
|
| 102 |
# If it exists, delete the existing collection
|