mirror of
https://github.com/semantica-agi/semantica.git
synced 2026-08-29 04:26:20 +00:00
Fix dependency issues, align GraphRAG notebook, and update changelog
This commit is contained in:
@@ -473,19 +473,14 @@
|
||||
" try:\n",
|
||||
" if os.path.exists(file_path):\n",
|
||||
" print(f\" Processing: {file_path}\")\n",
|
||||
" file_data = file_ingestor.ingest_file(file_path)\n",
|
||||
" # ingest_file returns a single FileObject, not a list\n",
|
||||
" if hasattr(file_data, 'text') and file_data.text:\n",
|
||||
" all_content.append(file_data.text)\n",
|
||||
" elif hasattr(file_data, 'content') and file_data.content:\n",
|
||||
" # If content is bytes, decode it\n",
|
||||
" if isinstance(file_data.content, bytes):\n",
|
||||
" try:\n",
|
||||
" text = file_data.content.decode('utf-8')\n",
|
||||
" all_content.append(text)\n",
|
||||
" except UnicodeDecodeError:\n",
|
||||
" print(f\" Warning: Could not decode content from {file_path}\")\n",
|
||||
" print(f\" Successfully ingested {file_path}\")\n",
|
||||
" file_obj = file_ingestor.ingest_file(file_path)\n",
|
||||
" \n",
|
||||
" # Access content via the text property (automatically handles decoding)\n",
|
||||
" if file_obj.text:\n",
|
||||
" all_content.append(file_obj.text)\n",
|
||||
" print(f\" Successfully ingested {file_path}\")\n",
|
||||
" else:\n",
|
||||
" print(f\" Warning: No text content extracted from {file_path}\")\n",
|
||||
" else:\n",
|
||||
" print(f\" Warning: File not found: {file_path}\")\n",
|
||||
" except Exception as e:\n",
|
||||
|
||||
Reference in New Issue
Block a user