mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-13 16:36:06 +00:00
IMPROVEMENT: Added title metadata to GoogleDriveLoader for optional File Loaders (#13832)
- **Description:** Simple change, I just added title metadata to GoogleDriveLoader for optional File Loaders - **Dependencies:** no dependencies - **Tag maintainer:** @hwchase17 --------- Co-authored-by: Bagatur <baskaryan@gmail.com>
This commit is contained in:
parent
19c68c7652
commit
c172605ea6
@ -317,6 +317,8 @@ class GoogleDriveLoader(BaseLoader, BaseModel):
|
||||
docs = loader.load()
|
||||
for doc in docs:
|
||||
doc.metadata["source"] = f"https://drive.google.com/file/d/{id}/view"
|
||||
if "title" not in doc.metadata:
|
||||
doc.metadata["title"] = f"{file.get('name')}"
|
||||
return docs
|
||||
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user