Skip to content

Commit

Permalink
cr
Browse files Browse the repository at this point in the history
  • Loading branch information
baskaryan committed Nov 25, 2023
1 parent 6e7f942 commit fe5fedd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libs/langchain/langchain/document_loaders/googledrive.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,8 @@ def _load_file_from_id(self, id: str) -> List[Document]:
docs = loader.load()
for doc in docs:
doc.metadata["source"] = f"https://drive.google.com/file/d/{id}/view"
doc.metadata["title"] = f"{file.get('name')}"
if "title" not in doc.metadata:
doc.metadata["title"] = f"{file.get('name')}"
return docs

else:
Expand Down

0 comments on commit fe5fedd

Please sign in to comment.