Переглянути джерело

Merge pull request #3688 from leobenkel/no-trace-when-success

fix: Remove the tracestack when the collection already exists
Timothy Jaeryang Baek 10 місяців тому
батько
коміт
7e6c5193d6
1 змінених файлів з 2 додано та 1 видалено
  1. 2 1
      backend/apps/rag/main.py

+ 2 - 1
backend/apps/rag/main.py

@@ -1004,10 +1004,11 @@ def store_docs_in_vector_db(docs, collection_name, overwrite: bool = False) -> b
 
         return True
     except Exception as e:
-        log.exception(e)
         if e.__class__.__name__ == "UniqueConstraintError":
             return True
 
+        log.exception(e)
+
         return False