mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-08 22:42:05 +00:00
[Community][minor]: Updating source path, and file path for SharePoint loader in PebbloSafeLoader (#25592)
- **Description:** Updating source path and file path in Pebblo safe loader for SharePoint apps during loading - **Issue:** NA - **Dependencies:** NA - **Tests:** NA - **Docs** NA --------- Co-authored-by: dristy.cd <dristy@clouddefense.io>
This commit is contained in:
committed by
GitHub
parent
745d1c2b8d
commit
fbb4761199
@@ -252,11 +252,16 @@ class PebbloSafeLoader(BaseLoader):
|
||||
"""Add Pebblo specific metadata to documents."""
|
||||
for doc in self.docs_with_id:
|
||||
doc_metadata = doc.metadata
|
||||
doc_metadata["full_path"] = get_full_path(
|
||||
doc_metadata.get(
|
||||
"full_path", doc_metadata.get("source", self.source_path)
|
||||
if self.loader.__class__.__name__ == "SharePointLoader":
|
||||
doc_metadata["full_path"] = get_full_path(
|
||||
doc_metadata.get("source", self.source_path)
|
||||
)
|
||||
else:
|
||||
doc_metadata["full_path"] = get_full_path(
|
||||
doc_metadata.get(
|
||||
"full_path", doc_metadata.get("source", self.source_path)
|
||||
)
|
||||
)
|
||||
)
|
||||
doc_metadata["pb_checksum"] = classified_docs.get(doc.pb_id, {}).get(
|
||||
"pb_checksum", None
|
||||
)
|
||||
|
Reference in New Issue
Block a user