Update utils.py
Browse files
utils.py
CHANGED
@@ -565,11 +565,9 @@ def extract_document_info(documents):
|
|
565 |
download_link = f"https://huggingface.co/spaces/alexkueck/SucheRAG/resolve/main/chroma/kkg/word/{title}"
|
566 |
else:
|
567 |
download_link = doc_path
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
else:
|
572 |
-
id = None
|
573 |
|
574 |
info = {
|
575 |
'content': doc.page_content,
|
|
|
565 |
download_link = f"https://huggingface.co/spaces/alexkueck/SucheRAG/resolve/main/chroma/kkg/word/{title}"
|
566 |
else:
|
567 |
download_link = doc_path
|
568 |
+
|
569 |
+
# Prüfe, ob doc_id existiert und weise einen Standardwert zu, falls nicht
|
570 |
+
id = getattr(doc, 'doc_id', None)
|
|
|
|
|
571 |
|
572 |
info = {
|
573 |
'content': doc.page_content,
|