alexkueck commited on
Commit
6b4c237
·
verified ·
1 Parent(s): 78b2701

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +3 -5
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
- if doc.doc_id:
570
- id = doc.doc_id
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,